示例#1
0
 public void Awake()
 {
     if (SaveControl.GetInt("GhostForm") == 1)
     {
         DirectGhostForm();
     }
 }
示例#2
0
 private void Awake()
 {
     if (ActivateKey != "" && !Active && SaveControl.GetInt(ActivateKey) == 1)
     {
         Active = true;
     }
 }
示例#3
0
 // Update is called once per frame
 void Update()
 {
     if (Character.Main.GhostForm)
     {
         TEXT.text = "Ghost Form";
         int a = (int)SaveControl.GetFloat("GhostTimeII");
         if (a >= 0)
         {
             TimeText.text = a.ToString();
         }
         else
         {
             TimeText.text = "";
         }
     }
     else
     {
         TEXT.text = "";
         int a = (int)SaveControl.GetFloat("GhostTime");
         if (a >= 0)
         {
             TimeText.text = a.ToString();
         }
         else
         {
             TimeText.text = "";
         }
     }
 }
示例#4
0
 public void LoadNumbers()
 {
     for (int i = 0; i < CurrentNumbers.Count; i++)
     {
         CurrentNumbers[i] = SaveControl.GetInt("Number" + i);
     }
 }
示例#5
0
 public override void Effect()
 {
     base.Effect();
     SaveControl.SetString("Room", RoomKey);
     SaveControl.SetInt("Entrance", EntranceIndex);
     OutlinersControl.Main.ChangeLevel();
 }
示例#6
0
 public void SaveNumbers()
 {
     for (int i = 0; i < CurrentNumbers.Count; i++)
     {
         SaveControl.SetInt("Number" + i, CurrentNumbers[i]);
     }
 }
示例#7
0
 public void Awake()
 {
     if (SaveControl.GetInt(Key) == 1)
     {
         IO.gameObject.SetActive(false);
         Destroy(IO.gameObject);
     }
 }
示例#8
0
 // Update is called once per frame
 void Update()
 {
     RenderNumbers();
     if (SaveControl.GetFloat("GhostTime") <= 0 && !AlreadyLoaded)
     {
         AlreadyLoaded = true;
         OutlinersControl.Main.ChangeLevel();
     }
 }
示例#9
0
文件: NPC.cs 项目: zittacheng/Vampire
 public void Awake()
 {
     if (SaveControl.GetInt(KillKey) == 1)
     {
         AnimBase.SetActive(false);
         C2D.enabled = false;
         Destroy(gameObject);
     }
 }
示例#10
0
 public void Awake()
 {
     if (GameObject.FindGameObjectsWithTag("SaveControl").Length > 1 && Main != this)
     {
         Destroy(gameObject, 0.1f);
         return;
     }
     Main = this;
     DontDestroyOnLoad(gameObject);
 }
示例#11
0
 public void GhostForm()
 {
     if (!GhostControl)
     {
         return;
     }
     SaveControl.SetInt("GhostForm", 1);
     Character.Main.SetGhostForm(true);
     GhostFormEffectAnim.SetTrigger("GhostForm");
     KillProtectTime = 1.5f;
 }
示例#12
0
        public void Ini()
        {
            int i = SaveControl.GetInt("Entrance");

            if (Entrances.Count <= i)
            {
                i = 0;
            }
            Character.Main.SetPosition(Entrances[i].GetCharacterPosition().x, Entrances[i].GetCharacterPosition().y);
            Character.Main.SetDirection(Entrances[i].direction);
            OutlinersControl.Main.SetRoom(this);
        }
示例#13
0
文件: NPC.cs 项目: zittacheng/Vampire
        public void Kill()
        {
            /*
             * Anim.SetBool("Kill", true);
             * Destroy(gameObject, 10);*/

            C2D.enabled = false;
            SaveControl.SetInt(KillKey, 1);
            Character.Main.StartKill();
            OutlinersControl.Main.CreateKillEffect(TargetPoint.transform.position);
            Destroy(gameObject, KillDelay);
        }
示例#14
0
        public void OnMouseDown()
        {
            if (AlreadyDead)
            {
                return;
            }

            AlreadyDead = true;
            Anim.SetBool("Coin", true);
            SaveControl.SetInt("Coin", SaveControl.GetInt("Coin") + 1);
            SaveControl.SetInt("PuzzleFinished", 1);
        }
示例#15
0
 public void Awake()
 {
     if (SaveControl.GetString("Room") == Key)
     {
         Base.SetActive(true);
         Ini();
     }
     else
     {
         Base.SetActive(false);
     }
 }
示例#16
0
 public void ChangeBack()
 {
     SaveControl.SetInt("GhostForm", 0);
     Character.Main.SetGhostForm(false);
     GhostFormEffectAnim.SetTrigger("ChangeBack");
     if (SaveControl.GetFloat("MaxGhostTime") > 60)
     {
         SaveControl.SetFloat("MaxGhostTime", SaveControl.GetFloat("MaxGhostTime") - 30);
         SaveControl.SetFloat("MaxGhostTimeII", SaveControl.GetFloat("MaxGhostTimeII") - 10);
     }
     SaveControl.SetFloat("GhostTime", SaveControl.GetFloat("MaxGhostTime"));
     SaveControl.SetFloat("GhostTimeII", SaveControl.GetFloat("MaxGhostTimeII"));
 }
示例#17
0
 public void Awake()
 {
     if (SaveControl.GetInt(Key) == 1)
     {
         if (IO)
         {
             IO.Active = true;
         }
         if (Anim)
         {
             Anim.SetBool("Active", true);
         }
     }
 }
示例#18
0
        // Update is called once per frame
        void Update()
        {
            int a = SaveControl.GetInt(Key);

            if (a <= 0)
            {
                Base.SetActive(false);
            }
            CountText.text = a.ToString();
            if (a > 0)
            {
                Base.SetActive(true);
            }
        }
示例#19
0
 // Update is called once per frame
 void Update()
 {
     if (SaveControl.GetInt("GhostForm") != 1)
     {
         SaveControl.SetFloat("GhostTime", SaveControl.GetFloat("GhostTime") - Time.deltaTime);
         if (SaveControl.GetFloat("GhostTime") <= 0)
         {
             GhostForm();
         }
     }
     else
     {
         SaveControl.SetFloat("GhostTimeII", SaveControl.GetFloat("GhostTimeII") - Time.deltaTime);
         if (SaveControl.GetFloat("GhostTimeII") <= 0 && !AlreadyDead)
         {
             AlreadyDead = true;
             ChangeScene("Defeat");
         }
     }
     KillProtectTime -= Time.deltaTime;
 }
示例#20
0
 public override void Effect()
 {
     base.Effect();
     SaveControl.SetInt(Key, SaveControl.GetInt(Key) + Change);
 }
示例#21
0
 public override void Effect()
 {
     base.Effect();
     SaveControl.SetInt(Key, Value);
 }
示例#22
0
        public override bool Active()
        {
            int a = SaveControl.GetInt(Key);

            return(base.Active() && a <= ValueMax && a >= ValueMin);
        }