예제 #1
0
        //TODO Add laser particle
        private void OnFireLasers()
        {
            RaycastHit hit;

            if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, Mathf.Infinity))
            {
                BotMovement bot = hit.collider.GetComponent <BotMovement>();
                if (bot != null)
                {
                    Deck deck = bot.GetComponent <Deck>();
                    deck.DiscardCard(spamCard);
                }
            }
        }
예제 #2
0
        public void PushBot(BotMovement bot, Vector3 direction)
        {
            bot.transform.position += direction;
            Waypoint result = bot.gridPositionHandler.FixPositionToWaypoint();

            if (result == null)
            {
                bot.DestroyBot();
            }
            if (bot.isAlive)
            {
                bot.CheckForBotCollision(bot.GetComponent <GridPositionHandler>().CurrentWaypoint, direction);
            }
        }