Ejemplo n.º 1
0
		//class constructor
		public actorMovement(float _speed, float _rotateSpeed, Transform _transform, actorInput _input)
		{
			speed = _speed;
			rotateSpeed = _rotateSpeed;
			transformObj = _transform;
			input = _input;

		}
Ejemplo n.º 2
0
		// Use this for initialization
	void Start() {
		_actorInput = new actorInput ();
		_actorMovement = new actorMovement (speed, rotateSpeed, gameObject.transform, _actorInput);
		_animationController = new animationController (_actorInput, gameObject.GetComponent<Animator>());

		Action movementStart = ()=>{};
		Action animationStart = ()=>{};
		movementStart = GetAction (_actorMovement, "Start");
		animationStart = GetAction (_animationController, "Start");
		movementStart ();
		animationStart ();

		movementUpdate = GetAction (_actorMovement, "Update");
		animationUpdate = GetAction (_animationController, "Update");
		inputUpdate = GetAction (_actorInput, "Update");
		
		
		}
		//class constructor
		public animationController(actorInput _input, Animator _anim)
		{
			anim = _anim;
			input = _input;
		}