예제 #1
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);
		}
예제 #2
0
		public void OnTargetDeath (UnitState.UnitStateEventArgs args) {
			if (target == args.unit) {
				ClearTarget ();
			} else {
				Debug.LogError ("CharacterAttack -> target != unit in OnTargetDeath()");
			}
		}