Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using RavelNetworking;
  5.  
  6. public class InstantiateSphere : NetHelper
  7. {
  8.     [RSync]
  9.     public int Count, Age, Speed;
  10.  
  11.     [RSync]
  12.     public string TextInfo;
  13.  
  14.     [RSync]
  15.     public float Height, Size;
  16.  
  17.     public Transform instantiateSpot;
  18.     private int PriorCount;
  19.     private string PriorString;
  20.  
  21.     public void Update()
  22.     {
  23.         if (Count != PriorCount)
  24.         {
  25.             PriorCount = Count;
  26.             Sync(true, "Count");
  27.         }
  28.  
  29.         if (TextInfo != PriorString)
  30.         {
  31.             PriorString = TextInfo;
  32.             Sync(true, "TextInfo");//true being that were syncing a variable we can do many at one time
  33.         }
  34.  
  35.         if (Input.GetKeyDown(KeyCode.Escape))
  36.             Sync("GiveCash", 4.5f, "levon");
  37.     }
  38.  
  39.  
  40.     [RSync]
  41.     public void GiveCash(float amount, string player)
  42.     {
  43.  
  44.     }
  45.  
  46.     [RSync]
  47.     public void RubADub(string name, int age)
  48.     {
  49.  
  50.     }
  51.  
  52.     [RSync]
  53.     public void Crack(byte grams, object types)
  54.     {
  55.  
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement