void Start() { turnManager = FindObjectOfType <TurnManager>(); players = FindObjectsOfType <Register>(); bot = GetComponent <BotMovement>(); deck = GetComponent <Deck>(); }
//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); } } }
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); } }