コード例 #1
0
        public void RemoveFrom(object updateble)
        {
            var mngUpdate = CoreTools.GetManager <Updater>();

            if (updateble is ITick)
            {
                mngUpdate.ticks.Remove(updateble as ITick);
            }

            if (updateble is ITickFixed)
            {
                mngUpdate.ticksFixes.Remove(updateble as ITickFixed);
            }

            if (updateble is ITickLate)
            {
                mngUpdate.ticksLate.Remove(updateble as ITickLate);
            }
        }
コード例 #2
0
        public void AddTo(object updateble)
        {
            var mngUpdate = CoreTools.GetManager <Updater>();

            if (updateble is ITick)
            {
                mngUpdate.ticks.Add(updateble as ITick);
            }

            if (updateble is ITickFixed)
            {
                mngUpdate.ticksFixes.Add(updateble as ITickFixed);
            }

            if (updateble is ITickLate)
            {
                mngUpdate.ticksLate.Add(updateble as ITickLate);
            }
        }
コード例 #3
0
 void Start()
 {
     CoreTools.GetManager <Updater>().AddTo(this);
     gameManager = CoreTools.GetManager <GameManager>();
     player      = gameManager.GetPlayer();
 }
コード例 #4
0
 void Start()
 {
     CoreTools.GetManager <Updater>().AddTo(this);
 }