コード例 #1
0
ファイル: FBishopElement.cs プロジェクト: solhwi/Queen
    private bool preState, curState; // true : will 충분, false : will 부족

    private void Start()
    {
        willBar       = FindObjectOfType <WillBar>();
        pointerMgr    = FindObjectOfType <PointerMgr>();
        toggle        = GetComponent <Toggle>();
        pieceIdx      = GenericDataMgr.genericData_SO.GetPieceIdxByCode(code);
        cost          = GenericDataMgr.genericData_SO.ChessPieces[pieceIdx].cost;
        costText.text = GenericDataMgr.genericData_SO.ChessPieces[pieceIdx].cost.ToString();
    }
コード例 #2
0
ファイル: PieceSelectedState.cs プロジェクト: solhwi/Queen
    public PieceSelectedState(LayerMask _gridLayer, LayerMask _UILayer, WillBar _willBar, List <Toggle> _pieceToggles, GameObject _selectedPiece, string _selectedPieceCode)
    {
        gridLayer         = _gridLayer;
        UILayer           = _UILayer;
        willBar           = _willBar;
        selectedPiece     = _selectedPiece;
        selectedPieceCode = _selectedPieceCode;

        pieceToggles.Clear();
        foreach (var t in _pieceToggles)
        {
            pieceToggles.Add(t);
        }


        // 기물인텍스, 코스트 캐시
        pieceIdx = GenericDataMgr.genericData_SO.GetPieceIdxByCode(selectedPieceCode);
        cost     = GenericDataMgr.genericData_SO.ChessPieces[pieceIdx].cost;
    }
コード例 #3
0
    private Queen queen;    // Skill사용 애니메이션을 트리거하기 위함

    private void Start()
    {
        willBar             = FindObjectOfType <WillBar>();
        manaBar             = FindObjectOfType <ManaBar>();
        queen               = FindObjectOfType <Queen>();
        previewSkillPrefabs = new GameObject[FindObjectsOfType <Grid>().Length];

        // piece selection toggle 들을 초기화
        PieceSelectionToggle[] tmpArr1 = FindObjectsOfType <PieceSelectionToggle>();
        foreach (PieceSelectionToggle t in tmpArr1)
        {
            pieceToggles.Add(t.GetComponent <Toggle>());
        }

        // skill selection toggle 들을 초기화
        SkillSelectionToggle[] tmpArr2 = FindObjectsOfType <SkillSelectionToggle>();
        foreach (SkillSelectionToggle t in tmpArr2)
        {
            skillToggles.Add(t.GetComponent <Toggle>());
        }

        pointerModeState = new NoneState();
        pointerModeState.Enter();
    }
コード例 #4
0
ファイル: FBishopUI.cs プロジェクト: solhwi/Queen
 private void Start()
 {
     willBar = FindObjectOfType <WillBar>();
     cost    = 30;
 }