void Update()
    {
        if (_owner.Player == PlayerSide.None)
        {
            return;
        }
        float deltaTime = Time.deltaTime;

        ProduceTime += deltaTime;
        if (ProduceTime >= ProduceDelay)
        {
            _gameManager.AddGold(_owner.Player, Ammount);
            AddGold?.Invoke(PopUpTypes.GoldUp, Ammount);
            ProduceTime = 0;
        }
    }
Beispiel #2
0
    public IPotion Create(potionRequrements requrements)
    {
        IPotion potion = new BasicPotion();

        //animal parts
        for (int i = requrements.ratTail; i > 0; i--)
        {
            potion = new AddRT(potion);
        }

        for (int i = requrements.owlEye; i > 0; i--)
        {
            potion = new AddOE(potion);
        }
        //flowers
        for (int i = requrements.lylack; i > 0; i--)
        {
            potion = new AddLylack(potion);
        }

        for (int i = requrements.sunflower; i > 0; i--)
        {
            potion = new AddSun(potion);
        }
        //metal
        for (int i = requrements.silver; i > 0; i--)
        {
            potion = new AddSilver(potion);
        }

        for (int i = requrements.gold; i > 0; i--)
        {
            potion = new AddGold(potion);
        }
        return(potion);
    }
Beispiel #3
0
        public void NotifyAddGold(IChampion c, IAttackableUnit died, float gold)
        {
            var ag = new AddGold(c, died, gold);

            _packetHandlerManager.BroadcastPacket(ag, Channel.CHL_S2C);
        }
Beispiel #4
0
        public void notifyAddGold(Champion c, Unit died, float gold)
        {
            var ag = new AddGold(c, died, gold);

            _game.PacketHandlerManager.broadcastPacket(ag, Channel.CHL_S2C);
        }
Beispiel #5
0
        public static void notifyAddGold(Champion c, Unit died, float gold)
        {
            var ag = new AddGold(c, died, gold);

            PacketHandlerManager.getInstace().broadcastPacket(ag, Channel.CHL_S2C);
        }