Example #1
0
    public void ShotWire(Vector3 objPos)
    {
        if (flg_shoted)
        {
            return;
        }

        //マウスの方向に射出
        //Vector3 baf_mouse = Camera.main.ScreenToWorldPoint (Input.mousePosition);
        //float baf_rotation = Mathf.Atan2(baf_mouse.y - obj_catcherPos.transform.position.y,baf_mouse.x - obj_catcherPos.transform.position.x);

        //引数のposに射出
        float baf_rotation = Mathf.Atan2(objPos.y - obj_catcherPos.transform.position.y, objPos.x - obj_catcherPos.transform.position.x);

        obj_shotChatcher = Instantiate(obj_catcher, transform.position, Quaternion.identity);
        CatcherController scr_catcherController = obj_shotChatcher.GetComponent <CatcherController>();

        obj_shotChatcher.transform.eulerAngles = new Vector3(0, 0, baf_rotation * Mathf.Rad2Deg);
        scr_catcherController.obj_initPos      = obj_catcherPos;
        scr_catcherController.scr_playerMove   = GetComponent <PlayerMove> ();

        flg_shoted = true;

        m_anime.SetBool("RunFlag", false);
        m_anime.SetBool("JumpFlag", false);

        enu_status = Status.WireShoted;
    }
Example #2
0
    public void InvokeSpecialPower(CatcherController catcher)
    {
        //Make bomb partile Effect
        catcher.GrenadeClick();

        //Destory all in a specific radius
        Collider2D[] hitColliders = Physics2D.OverlapCircleAll(transform.position, radius);
        DestoryAllInRadius(hitColliders);
    }
Example #3
0
 private void HoverVertice()
 {
     if (path.GetPathType() == PathType.Circular)
     {
         CatcherController catcher = catchersHolder.transform.GetChild(nextVericeIndex).GetComponent <CatcherController>();
         if (catcher != null)
         {
             catcher.Hover();
         }
     }
 }
Example #4
0
 public void InvokeSpecialPower(CatcherController catcher)
 {
     //Set Origin
     origin = catcher.gameObject.transform;
     //Raffle a random index from catchers
     index = Random.Range(0, catchersHolder.transform.childCount);
     //Set destination
     SetDestination(catchersHolder.transform.GetChild(index));
     IsDeadByClicking(true);
     catcher.RightClick();
 }
Example #5
0
    public void InvokeSpecialPower(CatcherController catcher)
    {
        catcher.RotateClick();

        Ring[] rings = GameObject.FindObjectsOfType <Ring>();

        if (rings.Length != 0)
        {
            rotationManager.TriggerRingRotationForSeconds(rings);
        }
    }
Example #6
0
    public void InvokeSpecialPower(CatcherController catcher)
    {
        //Maybe change color of the button when clicked
        catcher.StarClick();

        FruitsSpawner fruitsSpawner = GameObject.FindWithTag("CupcakeSpawner").GetComponent <FruitsSpawner>();

        if (fruitsSpawner != null)
        {
            fruitsSpawner.SetSpawnType(SpawnType.Circular);
        }
    }
Example #7
0
 public void InvokeSpecialPower(CatcherController catcher)
 {
     catcher.BonusClick();
     //uiController.SwitchCanvasForSeconds(bonusCanvas,bonusTime);
 }
Example #8
0
 public void InvokeSpecialPower(CatcherController catcher)
 {
     catcher.BombClick();
 }