Example #1
0
 // Use this for initialization
 void Start()
 {
     m_MoveSpeed = GameConfig.PlayerMoveSpeed;
     m_Child     = null;
     m_bWorking  = true;
     m_bIsAlive  = true;
 }
Example #2
0
 public void CreateChild(Player_Little pPlayer)
 {
     if (m_Child != null)
     {
         m_Child.CreateChild(pPlayer);
     }
     else
     {
         m_Child                    = pPlayer;
         m_Child.ParentPoint        = this.TailPoint;
         m_Child.transform.position = this.TailPoint.position;
         m_Child.m_PlayerMain       = this.m_PlayerMain;
     }
 }
Example #3
0
    public void CreateChild()
    {
        GameObject newChild = Instantiate(m_ChildPrefab) as GameObject;

        if (m_Child == null)
        {
            m_Child              = newChild.GetComponent <Player_Little>();
            m_Child.ParentPoint  = TailPoint;
            m_Child.m_PlayerMain = this;
        }
        else
        {
            m_Child.CreateChild(newChild.GetComponent <Player_Little>());
        }
    }
Example #4
0
 private void Awake()
 {
     m_Child = null;
 }