コード例 #1
0
ファイル: ClockTime.cs プロジェクト: Gogeen/GhostTrainAssets
    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
ファイル: AITown.cs プロジェクト: ttv86/CsNut
 /**
  * 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
ファイル: AITown.cs プロジェクト: ttv86/CsNut
 /**
  * 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;
 }