コード例 #1
0
ファイル: Mech.MoveAction.cs プロジェクト: harald921/Mecha
        public MoveAction(Mech inMechActor, System.Action inOnCompleteCallback) : base(inMechActor, inOnCompleteCallback)
        {
            _walkableTilePositions = _mechActor.movementComponent.GetWalkableTilePositions();

            _tilesIndicator = new TilesIndicator(_walkableTilePositions, new UnityEngine.Color(0, 1, 0, 0.5f));

            Program.inputManager.OnTileClicked        += ExecuteIfTileIsWalkable;
            _mechActor.inputComponent.OnSelectionLost += Cancel;
        }
コード例 #2
0
        public AttackAction(Mech inMechActor, System.Action inOnCompleteCallback, Weapon inWeaponInUse) : base(inMechActor, inOnCompleteCallback)
        {
            weaponInUse = inWeaponInUse;

            _positionsWithinRange = GetPositionsWithinRange();

            _tilesIndicator = new TilesIndicator(_positionsWithinRange, new UnityEngine.Color(1, 0, 0, 0.5f));

            Program.inputManager.OnTileClicked += ExecuteIfShootable;
        }