Example #1
0
    public static void createAgent(Vector3 pos)
    {
        GameObject      dummy = (GameObject)ProyectilController.Instantiate(Resources.Load("Prefab/Agent_1"));
        AgentController am    = (AgentController)dummy.GetComponent <AgentController> ();

        am.currentBehaviour = am.ListBehaviours[3];
    }
Example #2
0
    public static void createProjectile(Vector3 vel, Vector3 pos)
    {
        GameObject dummy = (GameObject)ProyectilController.Instantiate(Resources.Load("Prefab/Ball2"));
        AgentMeta  am    = (AgentMeta)dummy.GetComponent <AgentMeta> ();

        am.setVelocity(vel);
        am.setPosition(pos);
    }
Example #3
0
    public static void createProjectile(Vector3 vel, Vector3 pos)
    {
        GameObject          dummy = (GameObject)ProyectilController.Instantiate(Resources.Load("Prefab/Ball3"));
        ProyectilController am    = (ProyectilController)dummy.GetComponent <ProyectilController> ();

        am.startVelocity = vel;
        am.position      = pos;
    }