示例#1
0
 public void ChangeToAndShow(CardDisplay cardDisplay)
 {
     // sprite.sprite = cardDisplay.Card.Art;
     Spell.Description spell = cardDisplay.Card.Spell;
     currentSpell = spell;
     Show();
 }
示例#2
0
        public void SetAllCells(Spell.Description spell, Vector3 offset)
        {
            Spell.Hit hit = spell.hits[0];

            RemoveCells();

            aimFLoors = new List <GameObject>();


            foreach (Vector2Int pos in hit.Locations)
            {
                GameObject floor = Instantiate(floorPrefab);
                aimFLoors.Add(floor);
            }
        }
示例#3
0
        public void PositionAllCells(Spell.Description spell, Vector3 offset)
        {
            Spell.Hit hit = spell.hits[0];
            if (aimFLoors == null || hit.Locations.Count != aimFLoors.Count)
            {
                SetAllCells(spell, offset);
            }

            for (int i = 0; i < aimFLoors.Count; i++)
            {
                Vector2Int pos   = hit.Locations[i];
                GameObject floor = aimFLoors[i];
                if (floor == null)
                {
                    continue;
                }

                //pat = grid.GridPattern(pos);
                Vector3 floorPos = grid.GridToWorld(pos, WorldGrid.PlaceMode.TileCenter) + offset;
                floor.transform.position = floorPos + FLOOR_OFFSET;
            }
        }