// Use this for initialization void Start() { stages = 1; timer = 0; camScript = mainCamera.GetComponent <battleCamera>(); player = GameObject.Find("BattlePlayer"); }
private void Awake() { #region SingleTon if (instance != null) { Debug.Log("Warning multiple battleMangers found"); return; } instance = this; #endregion }
// Use this for initialization void Start() { // mainCamera = bScript.mainCamera; player = gameObject; moveScript = GetComponent <battlePlayerMovement>(); bScript = GameObject.FindGameObjectWithTag("BattleManager").GetComponent <BattleManager>(); controller = GetComponent <CharacterController>(); attackStage = 1; lineRend = GetComponent <LineRenderer>(); camScript = mainCamera.GetComponent <battleCamera>(); positionSpeed = 3; vBool = true; aBool = true; //using physics gravity gravity = Mathf.Abs(Physics2D.gravity.y); lineRend.SetPosition(0, transform.position); lineRend.SetPosition(1, transform.position); }
// Use this for initialization void Start() { // mainCamera = bScript.mainCamera; player = gameObject; moveScript = GetComponent <battlePlayerMovement>(); bScript = GameObject.FindGameObjectWithTag("BattleManager").GetComponent <BattleManager>(); controller = moveScript.controller; attackStage = 1; MiniGame = GameObject.FindGameObjectWithTag("PunchBackground"); PunchDial = GameObject.FindGameObjectWithTag("PunchDial"); PunchNodes = GameObject.FindGameObjectsWithTag("PunchNodes"); DialEndPoint = GameObject.FindGameObjectWithTag("DialEndPoint"); DialStartPoint = GameObject.FindGameObjectWithTag("DialStartPoint"); MiniGame.SetActive(false); positionSpeed = 3; camScript = mainCamera.GetComponent <battleCamera>(); setUpNodes(); }