Пример #1
0
    public void ShowActionTime(TownAction action)
    {
        ShowTime(currentTimeInHours);
        int minutes = 0;

        if (action is TownRepairAction)
        {
            minutes = ((TownRepairAction)action).GetTime();
        }
        else
        {
            minutes = action.GetTime();
        }
        Vector3 wheelRotation = timeWheel.transform.localEulerAngles;

        wheelRotation.z = arrow.transform.localEulerAngles.z - 90;
        timeWheel.transform.localEulerAngles = wheelRotation;

        Vector3 arrowRotation = arrow.transform.localEulerAngles;

        arrowRotation.z -= (float)minutes / 4;
        arrow.transform.localEulerAngles = arrowRotation;


        timeWheel.GetComponent <UISprite> ().fillAmount = ((float)minutes / 4) / 360;
    }
Пример #2
0
 /**
  * Perform a town action on this town.
  * @param town_id The town to perform the action on.
  * @param town_action The action to perform on the town.
  * @returns True if the action succeeded.
  */
 public static bool PerformTownAction(TownID town_id, TownAction town_action)
 {
     throw null;
 }
Пример #3
0
 /**
  * Find out if an action can currently be performed on the town.
  * @param town_id The town to perform the action on.
  * @param town_action The action to perform on the town.
  * @returns True if and only if the action can performed.
  */
 public static bool IsActionAvailable(TownID town_id, TownAction town_action)
 {
     throw null;
 }