Exemple #1
0
    public override bool Activate(string activeCase)
    {
        if (canActivate)
        {
            canActivate = false;
        }
        else
        {
            return(false);
        }

        Debug.Log("Activate Sunnary Wings.");

        TileChooserManager tileChooser = TileChooserManager.GetInstance();

        IAction actionEndPhase = new LambdaAction(
            () => {
            Owner.AddItem(this);
            canActivate = true;
        });

        // Not Building tiles
        List <PLOT> banned = Plot.BuildingPlot.Union(Plot.TemplePlot).ToList();

        banned.Add(PLOT.TRAVEL);

        tileChooser.Listen(this,
                           actionEndPhase,
                           banned,
                           10f);

        Owner.RemoveItem(this);
        Remove(true);
        // player active animation


        // DO NOT add item back to Item pool
        // ItemManager.Ins.AddItemToPool(this);

        return(true);
    }
Exemple #2
0
    public override IAction ActionOnEnter(Player obj)
    {
        IAction result = new LambdaAction(() =>
        {
            NotifyPlotEnter(obj);

            var tileChooser = TileChooserManager.GetInstance();

            ActionTravel travel = new ActionTravel(obj);

            IAction actionEndPhase = base.ActionOnEnter(obj);

            tileChooser.Listen(travel,
                               actionEndPhase,
                               null,
                               10f);
        });

        NotifyPlotEnter(obj);

        return(result);
    }
Exemple #3
0
 public void OnClick()
 {
     TileChooserManager.GetInstance().ChooseTile((int)plot);
     SoundManager.Ins.Play(AudioClipEnum.Select);
 }