// ------------------
        override public void OnCharacterAction(CharacterAction chara)
        {
            this.isActivated = !this.isActivated;

            if (this.targetRenderer != null)
            {
                this.targetRenderer.material.color = (this.isActivated ? this.activatedColor : Color.white);
            }

            if (this.soundEffect != null)
            {
                AudioSource.PlayClipAtPoint(this.soundEffect, this.transform.position);
            }
        }
Example #2
0
 // ---------------------
 virtual public bool IsNear(CharacterAction chara)
 {
     return((chara.transform.position - this.transform.position).sqrMagnitude < (this.radius * this.radius));
 }
Example #3
0
 abstract public void OnCharacterAction(CharacterAction chara);