예제 #1
0
    public override void Place(Vector2Int mainCoords, ObjectGrid objectGrid)
    {
        Vector2Int      pairCoords = mainCoords + GetPairOffset();
        DoubleBarricade main       = (DoubleBarricade)objectGrid.CreateCellObject(mainCoords, this);
        DoubleBarricade pair       = (DoubleBarricade)objectGrid.CreateCellObject(pairCoords, pairPrefab);

        main.Pair   = pair;
        main.Coords = mainCoords;
        pair.Pair   = main;
        pair.Coords = pairCoords;
    }
 public virtual void Place(Vector2Int coords, ObjectGrid objectGrid)
 {
     objectGrid.CreateCellObject(coords, this);
 }
예제 #3
0
    public override void Place(Vector2Int coords, ObjectGrid objectGrid)
    {
        ForceMovementTrap newTrap = (ForceMovementTrap)objectGrid.CreateCellObject(coords, this);

        newTrap.DirectionIndex = this.directionIndex;
    }