コード例 #1
0
    public void reset()
    {
        if (actor == null || !actor.isLoaded)
        {
            return;
        }

        actor.ResetParticles();
        pick.transform.position = pick_orig_pos;
        end.transform.position  = end_orig_pos;
        print("Reset!");
    }
コード例 #2
0
 public override void Initialize()
 {
     actor = GetComponent <ObiActor> ();
     c     = GetComponent <Collider> ();
     e     = GameObject.FindObjectOfType <EnemyManager> ();
     if (!trainingMode)
     {
         MaxStep = 0;
     }
     c.enabled = true;
     actor.ResetParticles();
     softBody.deformationResistance = 0.7f;
 }
コード例 #3
0
    public void Death()
    {
        AddReward(-1f);
        c.enabled = false;
        if (!trainingMode)
        {
            softBody.deformationResistance = 0;
        }
        EndEpisode();

        if (trainingMode)
        {
            actor.ResetParticles();
            Vector3 pos = e.allies[0].GetComponent <EnemyOneSM> ().NavMeshSpot();
            pos.y = 1.5f;
            actor.Teleport(pos, manager.gameObject.transform.rotation);
        }
    }