// Use this for initialization void Start() { m_MoveSpeed = GameConfig.PlayerMoveSpeed; m_Child = null; m_bWorking = true; m_bIsAlive = true; }
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; } }
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>()); } }
private void Awake() { m_Child = null; }