private IEnumerator Fire(Entity caster, Line line)
        {
            Locator.Scheduler.Lock();
            GameObject tossFXObj = Object.Instantiate(
                Assets.TossFXPrefab,
                caster.Cell.Position.ToVector3(),
                new Quaternion());
            LineProjectile proj = tossFXObj.GetComponent <LineProjectile>();

            proj.InitializeToss(caster, Entity, line);
            proj.Fire();
            yield return(delay);

            Locator.Scheduler.Unlock();
        }
 private IEnumerator Fire(Line[] lines)
 {
     Locator.Scheduler.Lock();
     for (int i = 0; i < count; i++)
     {
         GameObject tossFXObj = Object.Instantiate(
             Assets.TossFXPrefab,
             Entity.Cell.Position.ToVector3(),
             new Quaternion());
         LineProjectile proj = tossFXObj.GetComponent <LineProjectile>();
         proj.InitializeToss(Entity, item, lines[i]);
         proj.Fire();
         yield return(new WaitForSeconds(delay));
     }
     Locator.Scheduler.Unlock();
 }
        public override CommandResult Execute()
        {
            if (Actor.PlayerControlled(Entity))
            {
                switch (Locator.Player.RequestLine(out List <Cell> line, 7))
                {
                case InputMode.Cancelling:
                    return(CommandResult.Cancelled);

                case InputMode.Line:
                    return(CommandResult.InProgress);

                case InputMode.Default:
                {
                    if (item.InInventory)
                    {
                        Entity.GetComponent <Inventory>().RemoveItem(item);
                    }

                    // Line has come through
                    GameObject tossFXObj = Object.Instantiate(
                        Assets.TossFXPrefab,
                        Entity.Cell.Position.ToVector3(),
                        new Quaternion());
                    LineProjectile proj = tossFXObj.GetComponent <LineProjectile>();
                    proj.InitializeToss(Entity, item, line);
                    proj.Fire();

                    return(CommandResult.Succeeded);
                }

                default:
                    throw new Exception("Illegal InputMode returned.");
                }
            }
            else
            {
                throw new NotImplementedException();
            }
        }