예제 #1
0
        public SoldierInfo GetSoldierInfo(SARTS.Soldier.PieceType _pieceType)
        {
            SoldierInfo ret = null;

            for (int i = 0; i < m_soldierInfoArr.Length; ++i)
            {
                if (m_soldierInfoArr[i].pieceType == _pieceType)
                {
                    ret = m_soldierInfoArr[i];
                    break;
                }
            }
            return(ret);
        }
예제 #2
0
        public bool Init(GameManager _gameManagerScr, SARTS.Soldier.PlSide _plSide, SARTS.Soldier.PieceType _pieceType, Vector2Int _pos)
        {
            m_isInitialzed   = true;
            m_fraction       = 0f;
            m_gameManagerScr = _gameManagerScr;
            m_plSide         = _plSide;
            m_pieceType      = _pieceType;
            gameObject.name  = _plSide.ToString() + "_" + _pieceType.ToString();
            m_pos            = _pos;
            SoldierInfo info = m_gameManagerScr.GetSoldierInfo(_pieceType);

            if (info != null)
            {
                life = info.life;
            }
            fixPosition();
            return(true);
        }