Ejemplo n.º 1
0
    private void Start()
    {
        enemySprite.color = colors[0];

        gm = FindObjectOfType <MGameManager>();

        particle = Instantiate(particle, Vector3.zero, Quaternion.identity);

        particle.Pause();
    }
Ejemplo n.º 2
0
    //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;
        }
    }
Ejemplo n.º 3
0
    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);
    }
Ejemplo n.º 4
0
    private void Awake()
    {
        time = maxTime;

        gameM = FindObjectOfType <MGameManager>();
    }
Ejemplo n.º 5
0
 private void Start()
 {
     manager = FindObjectOfType <MGameManager>();
 }