Ejemplo n.º 1
0
 public TimeTrigger(int minutes, Action _onEnd)
 {
     onEnd             = _onEnd;
     startDate         = TimeManager.currentTime;
     totalMinutesOfEnd = TimeManager.totalMinutes + minutes;
     endDate           = startDate;
     endDate.Minute   += minutes;
 }
Ejemplo n.º 2
0
 public void Initialize()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Debug.LogError("You've put another time manager somewhere...");
     }
     currentTime = new TickDate(0);
 }
Ejemplo n.º 3
0
    public static string GetTimeString(int minutes)
    {
        TickDate date = new TickDate(minutes);

        if (date.Month == 0)
        {
            if (date.Day == 0)
            {
                if (date.Hour == 0)
                {
                    return(date.Minute.ToString() + " minutes");
                }
                return(date.Hour.ToString() + " hours and " + date.Minute + " minutes");
            }
            return(date.Day.ToString() + " ticks, " + date.Hour.ToString() + " hours and " + date.Minute + " minutes");
        }
        return(date.Month.ToString() + " tocks, " + date.Day.ToString() + " ticks, " + date.Hour.ToString() + " hours and " + date.Minute + " minutes");
    }
Ejemplo n.º 4
0
    public Company(Magnate founder)
    {
        this.founder    = founder;
        currentOwner    = founder;
        establishedDate = TimeManager.currentTime;


        boardOfDirectors           = new AIPlayer();
        boardOfDirectors.FirstName = "Board of Directors";

        TimeManager.instance.OnDayEvent += DailyDepartmentWork;

        engineeringDepartment = new EngineeringDepartment();
        facilitiesDepartment  = new FacilitiesDepartment();
        financeDepartment     = new FinanceDepartment();
        departments.Add(facilitiesDepartment);
        departments.Add(engineeringDepartment);
        departments.Add(financeDepartment);
    }