Пример #1
0
		// Use this for initialization
		void Start () {
			behavior = gameObject.FindBehavior () as CharacterBehavior;
			motor = behavior.motor as CharacterMotor;
			inventory = behavior.inventory;
			// ---
			lastAttackTime = Mathf.NegativeInfinity;
			action = new AttackAction();
			action.actionEnd = DoDamage;
		}
Пример #2
0
		// Use this for initialization
		protected virtual void Start () {
			state = GetComponentInChildren<UnitState>();
			motor = GetComponentInChildren<UnitMotor>();
			viewer = GetComponentInChildren<UnitViewer>();
			listener = GetComponentInChildren<UnitListener>();
			attack = GetComponentInChildren<CharacterAttack>();
			inventory = GetComponentInChildren<UnitInventory>();
			buffs = GetComponentInChildren<UnitBuffs>();
			
			unitTransform = GetComponentInChildren<UnitTransform>();
			selectBehavior = GetComponentInChildren<SelectBehavior>();
			//UnitsEventSystem.AddUnit (gameObject);
		}