/* Variables that each PBaseMovement State has a copy of: */

    public PBaseMovement_State(PBaseMovement behaviourIn)
    {
        behaviour        = behaviourIn;
        collisionState   = behaviour.collisionState;
        input            = behaviour.pInputManager;
        collisionManager = new PBaseMovement_CollisionManager(this, collisionState);
    }
    private void Awake()
    {
        /* Enforce Singleton: */
        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            _instance = this;
        }

        _input = GetComponent <PInputManager>();
    }
		/// <summary>
		/// Constructs a new PInputEventArgs
		/// </summary>
		/// <param name="inputManager">The input manager that dispatched this event.</param>
		/// <param name="e">An EventArgs that contains the event data.</param>
		/// <param name="type">The type of input event.</param>
		public PInputEventArgs(PInputManager inputManager, EventArgs e, PInputType type) {
			this.inputManager = inputManager;
			this.e = e;
			this.type = type;
		}
Exemple #4
0
 /// <summary>
 /// Constructs a new PInputEventArgs
 /// </summary>
 /// <param name="inputManager">The input manager that dispatched this event.</param>
 /// <param name="e">An EventArgs that contains the event data.</param>
 /// <param name="type">The type of input event.</param>
 public PInputEventArgs(PInputManager inputManager, EventArgs e, PInputType type)
 {
     this.inputManager = inputManager;
     this.e            = e;
     this.type         = type;
 }