private void Start() { enemySprite.color = colors[0]; gm = FindObjectOfType <MGameManager>(); particle = Instantiate(particle, Vector3.zero, Quaternion.identity); particle.Pause(); }
//public static Dictionary<string, MSpell1> spells = new Dictionary<string, MSpell1>(); private void Awake() { if (instance != null) { Debug.LogError("More than one GameManager in scene."); } else { instance = this; } }
public override void OnStartClient() { base.OnStartClient(); string netID = GetComponent <NetworkIdentity>().netId.ToString(); MPlayer player = GetComponent <MPlayer>(); networkAnimator = gameObject.GetComponent <NetworkAnimator>(); networkAnimator.SetParameterAutoSend(0, true); networkAnimator.SetTrigger("Speed"); networkAnimator.SetParameterAutoSend(1, true); networkAnimator.SetTrigger("Ground"); networkAnimator.SetParameterAutoSend(2, true); networkAnimator.SetParameterAutoSend(3, true); networkAnimator.SetParameterAutoSend(4, true); networkAnimator.SetParameterAutoSend(5, true); networkAnimator.SetParameterAutoSend(6, true); networkAnimator.SetParameterAutoSend(7, true); networkAnimator.SetParameterAutoSend(8, true); MGameManager.RegisterPlayer(netID, player); }
private void Awake() { time = maxTime; gameM = FindObjectOfType <MGameManager>(); }
private void Start() { manager = FindObjectOfType <MGameManager>(); }