Beispiel #1
0
 //@TODO: rename
 public void Initialize()
 {
     End();
     foreach (var Item in MovementPattern.GetIndicatorsPositions(GetComponent <GridElement>().GetPosition(), MovementIndicatorPrefab.IndicatorTags))
     {
         var Tmp = Instantiate(MovementIndicatorPrefab, Global.Vector2IntToVector3(Item), new Quaternion(), transform);
         Tmp.MovementComponent = this;
     }
 }
Beispiel #2
0
    private void SpawnIndicators()
    {
        DestroyIndicators();

        var AttackIndicators = MovementPattern.GetIndicatorsPositions(GridElement.GetPosition(), GridIndicatorPrefabAttack.IndicatorTags);
        var DefendIndicators = MovementPattern.GetIndicatorsPositions(GridElement.GetPosition(), GridIndicatorPrefabDefend.IndicatorTags);

        foreach (var Item in AttackIndicators)
        {
            Instantiate(GridIndicatorPrefabAttack, Global.Vector2IntToVector3(Item), new Quaternion(), transform);
            DefendIndicators.Remove(Item);
        }

        foreach (var Item in DefendIndicators)
        {
            Instantiate(GridIndicatorPrefabDefend, Global.Vector2IntToVector3(Item), new Quaternion(), transform);
        }
        //MovementPattern.Spawn(GridElement, GridIndicatorPrefab);
    }