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