예제 #1
0
 void Start()
 {
     stats = GetComponent <UnitStatsController>();
     movementController = GetComponent <UnitMovementController>();
     //turnController = GetComponent<UnitTurnController>();
     turnController = GetComponent <PlayerFMS>();
 }
예제 #2
0
    private void Start()
    {
        stats = GetComponent<Stats> ();
        uMC = GetComponent<UnitMovementController> ();
        uJC = GetComponent<UnitJobController> ();

        idle = new Idle (this);
        occupied = new Occupied (this);
        returnHome = new ReturnHome (this);
        fullfilingNeeds = new FullfilingNeeds (this);

        currentState = idle;
    }
예제 #3
0
파일: Unit.cs 프로젝트: ben657/ld45
 protected virtual void Start()
 {
     movementController = GetComponent <UnitMovementController>();
     Collider[] colliders = GetComponents <Collider>();
     foreach (Collider collider in colliders)
     {
         if (!collider.isTrigger)
         {
             boundsCollider = collider;
             break;
         }
     }
 }
예제 #4
0
 public override void InitBehavior()
 {
     unitTransform          = UnitObject.transform;
     UnitMovementController = UnitObject.UnitMovementController;
 }
예제 #5
0
파일: Unit.cs 프로젝트: bradfidel/Mercenary
    // TODO store callback with currently ongoing action - to start another one previous must finish first

    private void Awake()
    {
        m_movementController = GetComponent <UnitMovementController>();
        m_statistics         = GetComponent <UnitStatistics>();
    }