コード例 #1
0
    // Use this for initialization
    void Start()
    {
        points = GameObject.Find("PointTracker").GetComponent <Points>();

        // get test attributes
        launcher = GameObject.Find("Launcher").transform;
        lc       = launcher.gameObject.GetComponent <LaunchController>();
    }
コード例 #2
0
    public IEnumerator RockSpawn()
    {
        Debug.Log("Waiting to Spawn Ball");

        yield return(new WaitForSeconds(1f));

        Debug.Log("Spawning Ball");
        LaunchController.SpawnRock();
        yield return(new WaitForSeconds(5f));

        Destroy(gameObject);
    }
コード例 #3
0
 void Awake()
 {
     m_Animator             = GetComponent <Animator>();
     m_Rigidbody2D          = GetComponent <Rigidbody2D>();
     m_BoxCollider2D        = GetComponent <BoxCollider2D>();
     m_PhysicsUpdate        = GetComponent <PhysicsUpdate>();
     m_BoomLaunchController = GetComponent <LaunchController>();
     if (GameManager.Instance.Player1Transform == transform)
     {
         m_OtherPlayerController = GameManager.Instance.Player2Transform.GetComponent <PlayerController>();
     }
     else
     {
         m_OtherPlayerController = GameManager.Instance.Player1Transform.GetComponent <PlayerController>();
     }
     m_Model = transform.Find("Model");
 }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     springController = spring.GetComponent<SpringController>();
     launchController = launchCrate.GetComponent<LaunchController>();
 }
コード例 #5
0
 // Start is called before the first frame update
 private void Awake()
 {
     instance       = this;
     rockLauncher1  = rockLauncher;
     spawnLocation1 = spawnLocation;
 }
コード例 #6
0
 // Use this for initialization
 void Start()
 {
     springController = spring.GetComponent <SpringController>();
     launchController = launchCrate.GetComponent <LaunchController>();
 }