コード例 #1
0
        public void CopyFrom(AttackInformation other)
        {
            this.Id = other.Id;
            this.Power = other.Power;
            this.StayingTime = other.StayingTime;
            this.Type = other.Type;

            this.Effect = other.Effect;

            this.SourcePositionHorizontal = other.SourcePositionHorizontal;
            this.SourcePositionVertical = other.SourcePositionVertical;
        }
コード例 #2
0
 public bool OnDamaged(AttackInformation information)
 {
     //Debug.Log(information.Id.ToString() + ", " + this.lastAttackId.ToString() + ", "
     //    + this.invincibleTime.ToString() + ", " + Time.time.ToString());
     if (this.IsEnabled && information.Id != this.lastAttackId && this.invincibleTime < Time.time)
     {
         this.lastAttackId = information.Id;
         this.invincibleTime = information.StayingTime + Time.time;
         this.DamagedSubject.OnNext(information);
         return true;
     }
     return false;
 }
コード例 #3
0
 //void OnCollisionEnter(Collision other)
 //{
 //    this.TriggeredSubject.OnNext(null);
 //}
 public void OnGuarding(AttackInformation information)
 {
     this.GuardingSubject.OnNext(information);
     //Debug.Log(information.Id.ToString());
 }