public void Initialize(treeManager treeManager) { m_treeManager = treeManager; m_currentState = BeaverState.Running; m_beaverSpeedRunning = new Vector3(UnityEngine.Random.Range(this.transform.lossyScale.x / 40, this.transform.lossyScale.x / 20) * 1.6f, 0f, 0f); m_decalageHangOnTree = new Vector3(UnityEngine.Random.Range(-1.0f, 0.5f), UnityEngine.Random.Range(-0.3f, 0.3f), 0f); m_endAnimationScript.endFlyingAnimationAction += endFlyingAnimationListener; }
// Use this for initialization void Start() { m_listBeavers = new List <Beaver> (); m_beaverContainer.transform.position = GameObject.FindGameObjectWithTag("SpawnArea").transform.position; m_currentState = BeaversManagerState.GameStarting; m_timeStateStarted[(int)m_currentState] = Time.time; m_treeManager = GameObject.FindGameObjectWithTag("TreeManager").GetComponent <treeManager>(); }
// Use this for initialization void Start() { m_listBeavers = new List<Beaver> (); m_beaverContainer.transform.position = GameObject.FindGameObjectWithTag ("SpawnArea").transform.position; m_currentState = BeaversManagerState.GameStarting; m_timeStateStarted[(int)m_currentState] = Time.time; m_treeManager = GameObject.FindGameObjectWithTag ("TreeManager").GetComponent<treeManager>(); }
public void Initialize(treeManager treeManager) { m_treeManager = treeManager; m_currentState= BeaverState.Running; m_beaverSpeedRunning = new Vector3(UnityEngine.Random.Range(this.transform.lossyScale.x/40,this.transform.lossyScale.x/20)*1.6f,0f,0f); m_decalageHangOnTree = new Vector3 (UnityEngine.Random.Range (-1.0f, 0.5f), UnityEngine.Random.Range (-0.3f, 0.3f), 0f); m_endAnimationScript.endFlyingAnimationAction += endFlyingAnimationListener; }
// Start is called before the first frame update void Start() { tM = FindObjectOfType <treeManager>(); // we need this to access that handy dandy list! }