예제 #1
0
 // Use this for initialization
 void Start()
 {
     Instance             = this;
     RealTimeBetweenTurns = TimeBetweenTurns;
     RealTurnAngle        = TurnAngle;
     PointsThisRun        = 0;
 }
예제 #2
0
    private void OnMouseOver()
    {
        if (Input.GetMouseButtonDown(1) && UnitManager._selectedObject != null)
        {
            InteractionManager interactionManager;
            IInteract[]        validInteractions = null;

            if (GetComponent <IInteract>() != null)
            {
                interactionManager = GetComponent <InteractionManager>();
                validInteractions  = interactionManager.GetValidInteractions(UnitManager._selectedObject.GetComponent <Unit>()._unitType);
            }
            //IAct validActs = UnitManager._selectedObject.GetComponent<IAct>();

            if (validInteractions != null)
            {
                _uiGod = _uiGod == null?GameObject.FindGameObjectWithTag("GameGod").GetComponent <UIGod>() : _uiGod;

                _uiGod.UpdateDropDownMenu(validInteractions, transform.position);
            }
        }
    }
예제 #3
0
 private void Start()
 {
     _uiGod = GetComponent <UIGod>();
 }