Пример #1
0
    public override void Execute(CombatMiniatureProperties _properties, GameObject _user, EntityStatus _userStatus, Transform _shotOrigin)
    {
        tilePattern.Clear();
        patternBehaviours.Clear();

        _properties.cardHolder.RemoveFirst();
        BattlefieldScript _bfs = _properties.bfs;

        GeneratePattern(_properties, _user, _userStatus, _shotOrigin, _bfs);

        /*if (directionImage == null)
         * {
         *  foreach (TileClass _affectedTile in tilePattern)
         *  {
         *      TileEffects(_properties, _user, _userStatus, _shotOrigin, _affectedTile, _bfs);
         *  }
         * }
         * else
         * {
         *  var sortedOrderList = patternBehaviours.OrderBy(o => o.order);
         *  List<TilePatternBehaviour> _tempList = sortedOrderList.ToList();
         *  objectPooler.StartCoroutine(AdvancedTileEffect(_properties,_user,_userStatus, _tempList, _bfs));
         * }*/

        var sortedOrderList = patternBehaviours.OrderBy(o => o.order);
        List <TilePatternBehaviour> _tempList = sortedOrderList.ToList();

        _tempList.Reverse();

        coroutineScript = CoroutineScript.Instance;

        coroutineScript.StartRemoteCoroutine(AdvancedTileEffect(_properties, _user, _userStatus, _tempList, _bfs));
    }
Пример #2
0
 public Selectable(Calculate calculate, CoroutineScript coroutine, FACScript FAC, Init init, Render render)
 {
     this.calculate = calculate;
     this.coroutine = coroutine;
     this.FAC       = FAC;
     this.init      = init;
     this.render    = render;
 }
Пример #3
0
        public Init(CoroutineScript coroutine, FACScript FAC, TPScript TP)
        {
            moduleId = ++moduleIdCounter;

            this.coroutine = coroutine;
            this.FAC       = FAC;
            this.TP        = TP;

            calculate  = new Calculate(FAC, this);
            render     = new Render(calculate, FAC, this);
            selectable = new Selectable(calculate, coroutine, FAC, this, render);
        }
 // Start is called before the first frame update
 void Awake()
 {
     Instance = this;
 }