Esempio n. 1
0
    public void Active(bool state)
    {
        if (active == state)
        {
            return;
        }

        active = state;

        if (state == true)
        {
            CallListeners((listener) => listener.OnActivated());
        }
        else
        {
            CallListeners((listener) => listener.OnDeActivated());
        }

        foreach (Transform t in transform)
        {
            if (t.GetComponent <ParticleSystem>() == null)
            {
                t.gameObject.SetActive(active);
            }
        }

        movement.Activate(state);
    }
Esempio n. 2
0
 public void SetUp()
 {
     _camera   = new FakeCamera();
     _movement = new MovementForward(_camera.LeftHand, 5);
     _movement.Activate();
 }