예제 #1
0
        public override List <TreeNode> BuildTree()
        {
            var treeNode = new List <TreeNode>();

            if (_hook is ACE.DatLoader.Entity.AnimationHooks.AttackHook _attackHook)
            {
                var attackCone = new AttackCone(_attackHook.AttackCone);
                treeNode.AddRange(attackCone.BuildTree());
            }
            treeNode.AddRange(base.BuildTree());

            return(treeNode);
        }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        // Gets the Rigidbody component and stores it in 'rb'
        rb = GetComponent <Rigidbody>();
        rb.freezeRotation = true;

        // Reference to Animator component
        animator = GetComponent <Animator>();
        Debug.Log(animator.name);

        attackCone = transform.Find("Attack Cone").GetComponent <AttackCone>();

        audioSource   = GetComponent <AudioSource>();
        currentHealth = maxHealth;
    }
예제 #3
0
        public static AttackCone Read(DatReader datReader)
        {
            AttackCone a = new AttackCone();

            a.PartIndex = datReader.ReadUInt32();

            a.LeftX = datReader.ReadSingle();
            a.LeftY = datReader.ReadSingle();

            a.RightX = datReader.ReadSingle();
            a.RightY = datReader.ReadSingle();

            a.Radius = datReader.ReadSingle();
            a.Height = datReader.ReadSingle();
            return(a);
        }
예제 #4
0
파일: ObjCell.cs 프로젝트: roidzilla/ACE
        public void CheckAttack(int attackerID, Position attackerPos, float attackerScale, AttackCone attackCone, AttackInfo attackInfo)
        {
            foreach (var shadowObj in ShadowObjectList)
            {
                var pObj = shadowObj.PhysicsObj;
                if (pObj.ID == attackerID || pObj.State.HasFlag(PhysicsState.Static))
                {
                    continue;
                }

                var hitLocation = pObj.check_attack(attackerPos, attackerScale, attackCone, attackInfo.AttackRadius);
                if (hitLocation != 0)
                {
                    attackInfo.AddObject(pObj.ID, hitLocation);
                }
            }
        }