Exemple #1
0
    void Start()
    {
        blueGagNodePrefab         = ResourceNodeToSpawnPrefab.GetComponent <BlueGagNode>();
        blueGagNodePrefab.Spawner = this; //Maybe crate Init Method --> also this is connected to prefab Mayeb do this afther instantiate and conect to clone

        InvokeRepeating("SpawnBlueGag", 0, seconds);
    }
Exemple #2
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        //Debug.Log("PickAxe ENTER -> " + collision.name);

        if (collision.tag == "BlueGag") // TODO This needs to be changes to somthing less hard coded --> maybe check the layer insted? OR Add targets for pickaxe to check against
        {
            inRangeOfGagNode = false;
            GagNode          = null;
            node             = null;
        }
    }
Exemple #3
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        //Debug.Log("PickAxe ENTER -> " + collision.name);

        if (collision.tag == "BlueGag") // TODO This needs to be changes to somthing less hard coded --> maybe check the layer insted? OR Add targets for pickaxe to check against
        {
            Debug.Log("Inrage of GagNode !!!!!!!!!!");
            inRangeOfGagNode = true;
            GagNode          = collision.gameObject;
            node             = GagNode.GetComponent <BlueGagNode>();
        }
    }