// Use this for initialization protected override void Start() { exciteBear = (ExciteBear)GameObject.FindObjectOfType(typeof(ExciteBear)); velocity.x = -6f; // Random.Range( -6.5f, -5f ); currentState = HFState.PREPARING; base.Start(); }
void Start() { exciteBear = (ExciteBear)GameObject.FindObjectOfType(typeof(ExciteBear)); exciteText.gameObject.SetActive(false); gameState = GameState.MENUS; menuState = MenuState.REGULAR; }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { initialMousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); } else if (Input.GetMouseButton(0)) { mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); if (ExciteBear.SpriteDistanceApart(mousePos, initialMousePos) > flickMaxDistance) { exciteBear.Flick(mousePos - initialMousePos); } } else if (Input.GetMouseButtonUp(0)) { GameManager.Instance.MouseLifted(); mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); if (ExciteBear.SpriteDistanceApart(mousePos, initialMousePos) > flickMaxDistance * .125f) { exciteBear.Flick(mousePos - initialMousePos); } } }
void Start() { exciteBear = (ExciteBear)GameObject.FindObjectOfType(typeof(ExciteBear)); }