Exemple #1
0
        /// <summary>
        /// Awake is called when the script instance is being loaded.
        /// </summary>
        public override void Awake()
        {
            // 刚体 add by TangJian 2018/01/16 16:15:37
            base.Awake();
            // 动画 add by TangJian 2018/01/15 15:04:59
            skeletonAnimation = GetComponentInChildren <SkeletonAnimator>();

            // 伤害 add by TangJian 2018/01/15 15:05:04
            {
                damageController = GetComponentInChildren <DamageController>();
                var damageData = damageController.damageData;
                damageData.itriggerDelegate = this;
                damageData.force            = Vector3.zero;
            }
        }
Exemple #2
0
        void Start()
        {
            currentAngle = Vector3.zero;

            damageController = GetComponentInChildren <DamageController>();
            var damageData = damageController.damageData;

            damageData.itriggerDelegate = this;

            damageData.DamageDirectionType = DamageDirectionType.Directional; //朝向的伤害
            damageData.atk       = 1;                                         //
            damageData.direction = new Vector3(1, 0, 0);
            damageData.force     = new Vector3(5, 0, 0);
            damageData.hitType   = 2;

            Destroy(gameObject, 5);
        }
Exemple #3
0
 // 设置力度值
 public static DamageController SetForceValue(this DamageController target, float value)
 {
     target.damageData.forceValue = value;
     return(target);
 }
Exemple #4
0
 public static DamageController SetEffectOrientation(this DamageController target, Vector3 value)
 {
     target.damageData.effectOrientation = value;
     return(target);
 }
Exemple #5
0
 public static DamageController SetForcedOffset(this DamageController target, Vector3 value)
 {
     target.damageData.forcedOffset = value;
     return(target);
 }
Exemple #6
0
 public static DamageController SetIgnoreShiled(this DamageController target, bool ignoreShield)
 {
     target.damageData.ignoreShield = ignoreShield;
     return(target);
 }
Exemple #7
0
 public static bool IsCritical(this DamageController target)
 {
     return(target.damageData.isCritical);
 }
Exemple #8
0
 public static DamageController SetDamageMass(this DamageController target, float value)
 {
     target.damageData.DamageMass = value;
     return(target);
 }
Exemple #9
0
 public static DamageController SetId(this DamageController target, string id)
 {
     target.id = id;
     return(target);
 }
Exemple #10
0
 public static DamageController SetTriggerDelegate(this DamageController target, ITriggerDelegate itriggerDelegate)
 {
     target.damageData.itriggerDelegate = itriggerDelegate;
     return(target);
 }
Exemple #11
0
 public static DamageController SetOwner(this DamageController target, GameObject owner)
 {
     target.damageData.owner = owner;
     return(target);
 }
Exemple #12
0
 public static DamageController SetRecordType(this DamageController target, RecordType recordType)
 {
     target.damageData.recordType = recordType;
     return(target);
 }
Exemple #13
0
 public static DamageController SetDamageId(this DamageController target, string teamId)
 {
     target.damageData.DamageId = teamId;
     return(target);
 }
Exemple #14
0
 public static DamageController SetDestroyTime(this DamageController target, float time)
 {
     GameObject.Destroy(target.gameObject, time);
     return(target);
 }
Exemple #15
0
 public void AddCurrAnimDamageGameObject(DamageController damageController)
 {
     currAnimDamageControllerList.Add(damageController);
 }
Exemple #16
0
 public static DamageController SetMagical(this DamageController target, float magical)
 {
     target.damageData.magical = magical;
     return(target);
 }
Exemple #17
0
 public static DamageController SetPoiseCut(this DamageController target, float value)
 {
     target.damageData.poiseCut = value;
     return(target);
 }
Exemple #18
0
 public static DamageController SetHitType(this DamageController target, HitType hitType)
 {
     target.damageData.hitType = (int)hitType;
     return(target);
 }
Exemple #19
0
 public static DamageController SetCritical(this DamageController target, bool isCritical)
 {
     target.damageData.isCritical = isCritical;
     return(target);
 }
Exemple #20
0
 public static DamageController SetDirection(this DamageController target, Vector3 direction)
 {
     target.damageData.direction = direction;
     return(target);
 }
Exemple #21
0
 public static DamageController SetBreakShiled(this DamageController target, bool breakShield)
 {
     target.damageData.breakShield = breakShield;
     return(target);
 }
Exemple #22
0
 public static DamageController SetMoveBy(this DamageController target, Vector3 moveBy)
 {
     target.damageData.targetMoveBy = moveBy;
     return(target);
 }
Exemple #23
0
 public static DamageController SetUseForcedOffset(this DamageController target, bool value)
 {
     target.damageData.useForcedOffset = value;
     return(target);
 }
Exemple #24
0
 public static DamageController setDamageDirectionType(this DamageController target, DamageDirectionType damageDirectionType)
 {
     target.damageData.DamageDirectionType = damageDirectionType;
     return(target);
 }
Exemple #25
0
 public static DamageController SetForcedOffsetDuration(this DamageController target, float value)
 {
     target.damageData.forcedOffsetDuration = value;
     return(target);
 }
Exemple #26
0
 public static DamageController SetDamageEffectType(this DamageController target, DamageEffectType damageEffectType)
 {
     target.damageData.damageEffectType = damageEffectType;
     return(target);
 }
Exemple #27
0
 // 设置顿帧
 public static DamageController SetSelfSuspend(this DamageController target, float selfSuspendTime, float selfSuspendScale)
 {
     target.damageData.selfSuspendTime  = selfSuspendTime;
     target.damageData.selfSuspendScale = selfSuspendScale;
     return(target);
 }
Exemple #28
0
 public static DamageController SetAtkPropertyType(this DamageController target, AtkPropertyType atkPropertyType)
 {
     target.damageData.atkPropertyType = atkPropertyType;
     return(target);
 }
Exemple #29
0
 public void Add(DamageController damageController)
 {
     damageControllers.Add(damageController);
 }
Exemple #30
0
 public static DamageController SetAtk(this DamageController target, float atk)
 {
     target.damageData.atk = atk;
     return(target);
 }