public override IEnumerator ExecuteAction(CutsceneController controller, bool playNextNode = true)
    {
        TileEffectSprite sprite = Globals.GenerateTileEffectSprite(spawnPosition.X, spawnPosition.Y, tileeffectID);

        sprite.transform.SetParent(controller.spawnPoint);
        controller.tileeffects[spawnPosition.X, spawnPosition.Y] = sprite.gameObject;
        //we made want to keep track of this sprite somewere

        yield return(null);

        controller.NextNode();
    }
Beispiel #2
0
    public static TileEffectSprite GenerateTileEffectSprite(int x, int y, string animationID)
    {
        TileEffectSprite s = GameObject.Instantiate <TileEffectSprite>(
            Resources.Load <TileEffectSprite>("BaseObjects/TileEffect"),
            Globals.GridToWorld(x, y),
            Quaternion.identity);

        s.GetComponent <Animator>().runtimeAnimatorController =
            Globals.GEtAnatimationController(animationID);



        return(s);
    }
Beispiel #3
0
    public static void InitTileEffectVisual(TileNode tileNode, TileEffect effect)
    {
        if (effect.animationID == "")
        {
            return;
        }
        else
        {
            int x = tileNode.data.posX;
            int y = tileNode.data.posY;

            TileEffectSprite s = Globals.GenerateTileEffectSprite(tileNode.data.posX, tileNode.data.posY, effect.animationID);

            s.InitEffectSprite(effect.tempID, x, y);

            Globals.GetBoardManager().EffectBoard[x, y] = s;

            tileNode.effectSprites.Add(s);
        }
    }