예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        thePlatformingManager = GameObject.FindObjectOfType <PlatformingManager>();
        gameObject.tag        = "Bullet";
        rb = this.GetComponent <Rigidbody>();
        switch (direction)
        {
        case 0:
            movement = new Vector3(1f, 0f, 0f);
            break;

        case 1:
            movement = new Vector3(-1f, 0f, 0f);
            break;

        case 2:
            movement = new Vector3(0, 0f, 1f);
            break;

        case 3:
            movement = new Vector3(0f, 0f, -1f);
            break;
        }
        StartCoroutine(destroySelf());
    }
예제 #2
0
 // Start is called before the first frame update
 void Start()
 {
     build    = FindObjectOfType <BuildSettings>();
     platform = FindObjectOfType <PlatformingManager>();
     gc       = FindObjectOfType <GlobalController>();
     col      = GetComponent <BoxCollider2D>();
 }
예제 #3
0
 private void Awake()
 {
     bG            = FindObjectOfType <Background>();
     build         = FindObjectOfType <BuildSettings>();
     platform      = FindObjectOfType <PlatformingManager>();
     tO            = FindObjectOfType <TotalObjects>();
     pointer       = FindObjectOfType <Pointer>();
     needsUIUpdate = true;
 }
예제 #4
0
    // Start is called before the first frame update
    void Start()
    {
        thePlatformingManager = GameObject.FindObjectOfType <PlatformingManager>();
        interval = Random.Range(3.0f, 20.0f);
        switch (direction)
        {
        case 0:
            rotation = Quaternion.Euler(0, 0, 90);
            break;

        case 1:
            rotation = Quaternion.Euler(0, 0, 90);
            break;

        case 2:
            rotation = Quaternion.Euler(90, 0, 0);
            break;

        case 3:
            rotation = Quaternion.Euler(90, 0, 0);
            break;
        }
        StartCoroutine(randomFire(interval));
    }
예제 #5
0
 private void Awake()
 {
     platform = FindObjectOfType <PlatformingManager>();
 }
예제 #6
0
 // Start is called before the first frame update
 void Start()
 {
     thePlatformingManager = GameObject.FindObjectOfType <PlatformingManager>();
     rb = this.GetComponent <Rigidbody>();
 }