예제 #1
0
 /// <summary>
 /// Built-in Unity function for initialization.
 /// </summary>
 public void Awake()
 {
     //HP = PlayerCharacter.instance.MaxHP;
     self        = GetComponent <RectTransform>();
     selfImg     = GetComponent <Image>();
     playerAbs   = new Rect(0, 0, selfImg.sprite.texture.width - hitboxInset * 2, selfImg.sprite.texture.height - hitboxInset * 2);
     instance    = this;
     playerAudio = GetComponent <AudioSource>();
     SetSoul(new RedSoul(this));
     luaStatus = new LuaPlayerStatus(this);
 }
예제 #2
0
 /// <summary>
 /// Built-in Unity function for initialization.
 /// </summary>
 private void Awake()
 {
     self        = GetComponent <RectTransform>();
     selfImg     = GetComponent <Image>();
     playerAbs   = new Rect(0, 0, selfImg.sprite.texture.width - hitboxInset * 2, selfImg.sprite.texture.height - hitboxInset * 2);
     instance    = this;
     playerAudio = GetComponent <AudioSource>();
     hurtSound   = AudioClipRegistry.GetSound("hurtsound");
     healSound   = AudioClipRegistry.GetSound("healsound");
     SetSoul(new RedSoul(this));
     luaStatus = new LuaPlayerStatus(this);
 }