示例#1
0
    // Start is called before the first frame update
    void Awake()
    {
        circleSpawner   = FindObjectOfType <CircleSpawner>();
        inputController = FindObjectOfType <InputController>();

        inputController.buttonInputAction += ButtonInput;
    }
示例#2
0
    public void OnSceneGUI()
    {
        CircleSpawner spawner = target as CircleSpawner;

        Handles.color = Color.red;
        Handles.DrawWireDisc(spawner.transform.position, spawner.transform.up, spawner.circleRadius);
    }
示例#3
0
 void Start()
 {
     points        = 200;
     maxCircleSize = false;
     cs            = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CircleSpawner>();
     gc            = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ACGameContrl>();
     pmb           = GameObject.FindGameObjectWithTag("PauseArrow").GetComponent <PauseMenuButton>();
 }
示例#4
0
    private bool BearCanAttack()
    {
        bool res = CircleSpawner.DistanceIsLessThanThreshold(_rigidbody.position, _playerTransform.position, ATTACK_THRESHOLD);

        if (res)
        {
            Debug.Log("Bear is switching to ATTACK");
        }
        return(res);
    }
    private void OnSceneGUI()
    {
        system          = target as CircleSpawner;
        handleTransform = system.transform;
        handleRotation  = Tools.pivotRotation == PivotRotation.Local?
                          handleTransform.rotation : Quaternion.identity;

        Handles.color = Color.yellow;
        Handles.DrawWireDisc(system.transform.position, system.transform.up, system.radius);
    }
示例#6
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     for (int i = 0; i < 5; i++)
     {
         colorCodes[i] = 0;
     }
     startSpawning();
 }
示例#7
0
    // Start is called before the first frame update
    void Start()
    {
        circleSpawner = transform.parent.GetComponent <CircleSpawner>();
        speed         = circleSpawner.speed;
        spawnTime     = Time.time;
        image         = GetComponent <Image>();

        int i = Random.Range(0, 4);

        button = (InputController.ButtonInput)i;

        image.sprite = sprites[i];
        // StartCoroutine(MoveToPosition(transform, hitCircle.transform));
    }
示例#8
0
 void Start()
 {
     anim         = GetComponent <Animator> ();
     spawner      = FindObjectOfType <CircleSpawner>();
     soundManager = FindObjectOfType <SoundManager> ();
 }
示例#9
0
 private void Awake()
 {
     instance   = this;
     spawnTimer = Random.Range(1, 100);
 }