示例#1
0
 // 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();
 }
示例#2
0
 void Start()
 {
     exciteBear = (ExciteBear)GameObject.FindObjectOfType(typeof(ExciteBear));
     exciteText.gameObject.SetActive(false);
     gameState = GameState.MENUS;
     menuState = MenuState.REGULAR;
 }
示例#3
0
 // 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);
         }
     }
 }
示例#4
0
 void Start()
 {
     exciteBear = (ExciteBear)GameObject.FindObjectOfType(typeof(ExciteBear));
 }