Пример #1
0
    private void OnCollisionExit(Collision other)
    {
        Roamer roamer = other.gameObject.GetComponent <Roamer>();

        if (roamer == null)
        {
            return;
        }

        Vector3 tmp = m_rigidbody.velocity;

        tmp.z /= 5;
        m_rigidbody.velocity = tmp;

        if (!NetworkClient.active)
        {
            return;
        }
        if (roamer.isHuman != Character.characterControlledByLocalPlayer.isHuman)
        {
            return;
        }

        FalconUnity.setForceField(0, Vector3.zero);
    }
Пример #2
0
    //private void Update()
    //{
    //    if(transform.position)
    //}

    private void OnCollisionEnter(Collision other)
    {
        m_rigidbody.velocity *= 1.1f;

        Roamer roamer = other.gameObject.GetComponent <Roamer>();

        if (roamer == null)
        {
            return;
        }

        m_rigidbody.AddForce(other.contacts[0].normal * 5 * roamer.strenght * 2, ForceMode.Impulse);

        if (!NetworkClient.active)
        {
            return;
        }
        if (roamer.isHuman != Character.characterControlledByLocalPlayer.isHuman)
        {
            return;
        }

        Vector3 direction = 100 * other.contacts[0].normal * roamer.velocity;

        FalconUnity.setForceField(0, direction * m_forceFeedbackFactor * 5);
    }
Пример #3
0
    public static void Main()
    {
        string[] dests =
        {
            "rmsg://[email protected]/hotdope",
            "rmsg://[email protected]/workstation"
        };

        Roamer r = new Roamer(dests, 5);

        RM.DUDE();

        while (r.roam())
        {
            RM.ALERT(new object[] { 1, 2, 3 });
            RM.MESG("Thank Goodness!", 10);
        }
    }
Пример #4
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "DeathWall")
     {
         ResetSelf();
     }
     if (other.tag == "Hostile")
     {
         if (other.GetComponent <Chaser>() != null)
         {
             Chaser otherscript = other.GetComponent <Chaser>();
             otherscript.ResetEnemy();
         }
         if (other.GetComponent <Roamer>() != null)
         {
             Roamer otherscript = other.GetComponent <Roamer>();
             otherscript.ResetEnemy();
         }
         if (other.GetComponent <AsteroidSpawner>() != null)
         {
             AsteroidSpawner otherscript = other.GetComponent <AsteroidSpawner>();
             otherscript.ResetEnemy();
         }
         if (other.GetComponent <Shooter>() != null)
         {
             Shooter otherscript = other.GetComponent <Shooter>();
             otherscript.ResetEnemy();
         }
         if (other.GetComponent <Diver>() != null)
         {
             Diver otherscript = other.GetComponent <Diver>();
             otherscript.ResetEnemy();
         }
     }
     if (other.tag == "Player")
     {
         if (other.GetComponent <PlayerController>() != null)
         {
             PlayerController otherscript = other.GetComponent <PlayerController>();
             otherscript.TakeDamage();
         }
     }
 }
Пример #5
0
    public object Create(object Enum)
    {
        EnumHeroes code = (EnumHeroes)Enum;
        IHero      hero = null;

        switch (code)
        {
        case EnumHeroes.Carry:
            hero = new Carry();
            break;

        case EnumHeroes.Disabler:
            hero = new Disabler();
            break;

        case EnumHeroes.Jungler:
            hero = new Jungler();
            break;

        case EnumHeroes.Nucker:
            hero = new Nucker();
            break;

        case EnumHeroes.Roamer:
            hero = new Roamer();
            break;

        case EnumHeroes.Support:
            hero = new Support();
            break;

        case EnumHeroes.Tank:
            hero = new Tank();
            break;
        }
        SetHeroStats(ref hero, GetJsonParams(code));
        return(hero);
    }
Пример #6
0
 // Use this for initialization
 void Awake()
 {
     shieldBroken = false;
     roamer = GetComponent<Roamer>();
     controller = GetComponent<CharacterController>();
 }