Esempio n. 1
0
  // set kerbal to the 'freezed' unescapable state
  public static void SetFreezed(KerbalEVA kerbal)
  {
    // do nothing if already freezed
    if (kerbal.fsm.currentStateName != "freezed")
    {
      // create freezed state
      KFSMState freezed = new KFSMState("freezed");

      // create freeze event
      KFSMEvent eva_freeze = new KFSMEvent("EVAfreeze");
      eva_freeze.GoToStateOnEvent = freezed;
      eva_freeze.updateMode = KFSMUpdateMode.MANUAL_TRIGGER;
      kerbal.fsm.AddEvent(eva_freeze, kerbal.fsm.CurrentState);

      // trigger eva death event
      kerbal.fsm.RunEvent(eva_freeze);
    }

    // stop animations
    kerbal.GetComponent<Animation>().Stop();
  }
Esempio n. 2
0
        public void Load(KerbalEVA eva)
        {
            //Load KerbalEVA.
            this.eva = eva;
            loaded = true;

            //Set Name
            this.Name = eva.name;

            //module on last.
            EvaModule module = (EvaModule)eva.GetComponent(typeof(EvaModule));
            module.Load(this);

            EvaDebug.DebugWarning("EvaContainer.Load("+eva.name+")");
        }