Exemplo n.º 1
0
 void Start()
 {
     turnManager = FindObjectOfType <TurnManager>();
     players     = FindObjectsOfType <Register>();
     bot         = GetComponent <BotMovement>();
     deck        = GetComponent <Deck>();
 }
Exemplo n.º 2
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);
                }
            }
        }
Exemplo n.º 3
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);
            }
        }