private void Start() { Transform bodyTransform = transform.Find("Body"); unitSkeleton = new V_UnitSkeleton(1f, bodyTransform.TransformPoint, (Mesh mesh) => bodyTransform.GetComponent <MeshFilter>().mesh = mesh); unitAnimation = new V_UnitAnimation(unitSkeleton); animatedWalker = new AnimatedWalker(unitAnimation, GameAssets.UnitAnimTypeEnum.dSwordTwoHandedBack_Idle, GameAssets.UnitAnimTypeEnum.dSwordTwoHandedBack_Walk, 1f, .75f); state = State.Normal; }
private void Start() { Transform bodyTransform = transform.Find("Body"); unitSkeleton = new V_UnitSkeleton(1f, bodyTransform.TransformPoint, (Mesh mesh) => bodyTransform.GetComponent <MeshFilter>().mesh = mesh); unitAnimation = new V_UnitAnimation(unitSkeleton); animatedWalker = new AnimatedWalker(unitAnimation, UnitAnimType.GetUnitAnimType(idleAnimation), UnitAnimType.GetUnitAnimType(walkAnimation), idleFrameRate, walkFrameRate); state = State.Waiting; waitTimer = waitTimeList[0]; lastMoveDir = defaultAimDirection; attackUnitAnim = UnitAnimType.GetUnitAnimType("dMarine_Attack"); }
private void Start() { Transform bodyTransform = transform.Find("Body"); unitSkeleton = new V_UnitSkeleton(1f, bodyTransform.TransformPoint, (Mesh mesh) => bodyTransform.GetComponent <MeshFilter>().mesh = mesh); unitAnimation = new V_UnitAnimation(unitSkeleton); UnitAnimType idleUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Idle"); UnitAnimType walkUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Walk"); UnitAnimType hitUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Hit"); animatedWalker = new AnimatedWalker(unitAnimation, idleUnitAnim, walkUnitAnim, 1f, 1f); }
private void Awake() { Transform bodyTransform = transform.Find("Body"); unitSkeleton = new V_UnitSkeleton(1f, bodyTransform.TransformPoint, (Mesh mesh) => bodyTransform.GetComponent <MeshFilter>().mesh = mesh); unitAnimation = new V_UnitAnimation(unitSkeleton); UnitAnimType idleUnitAnim = UnitAnimType.GetUnitAnimType("dSwordTwoHandedBack_Idle"); UnitAnimType walkUnitAnim = UnitAnimType.GetUnitAnimType("dSwordTwoHandedBack_Walk"); UnitAnimType hitUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Hit"); UnitAnimType attackUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_PunchQuickAttack"); animatedWalker = new AnimatedWalker(unitAnimation, idleUnitAnim, walkUnitAnim, 1f, 1f); }
private void Start() { Transform bodyTransform = transform.Find("Body"); unitSkeleton = new V_UnitSkeleton(1f, bodyTransform.TransformPoint, (Mesh mesh) => bodyTransform.GetComponent <MeshFilter>().mesh = mesh); unitAnimation = new V_UnitAnimation(unitSkeleton); animatedWalker = new AnimatedWalker(unitAnimation, UnitAnimType.GetUnitAnimType(idleAnimation), UnitAnimType.GetUnitAnimType(walkAnimation), idleFrameRate, walkFrameRate); state = State.Waiting; waitTimer = waitTimeList[0]; lastMoveDir = aimDirection; attackUnitAnim = UnitAnimType.GetUnitAnimType("dMarine_Attack"); fieldOfView = Instantiate(pfFieldOfView, null).GetComponent <FieldOfView>(); fieldOfView.SetFoV(fov); fieldOfView.SetViewDistance(viewDistance); }
private void Start() { Transform bodyTransform = transform.Find("Body"); unitSkeleton = new V_UnitSkeleton(1f, bodyTransform.TransformPoint, (Mesh mesh) => bodyTransform.GetComponent <MeshFilter>().mesh = mesh); unitAnimation = new V_UnitAnimation(unitSkeleton); idleUnitAnim = GameAssets.UnitAnimTypeEnum.dSwordTwoHandedBack_Idle; walkUnitAnim = GameAssets.UnitAnimTypeEnum.dSwordTwoHandedBack_Walk; hitUnitAnim = null; attackUnitAnim = null; idleUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Idle"); walkUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Walk"); hitUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Hit"); attackUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_PunchQuickAttack"); animatedWalker = new AnimatedWalker(unitAnimation, idleUnitAnim, walkUnitAnim, 1f, .75f); state = State.Normal; }
private void Start() { Transform bodyTransform = transform.Find("Body"); unitSkeleton = new V_UnitSkeleton(1f, bodyTransform.TransformPoint, (Mesh mesh) => bodyTransform.GetComponent <MeshFilter>().mesh = mesh); unitAnimation = new V_UnitAnimation(unitSkeleton); idleUnitAnim = UnitAnimType.GetUnitAnimType("dMinion_Idle"); walkUnitAnim = UnitAnimType.GetUnitAnimType("dMinion_Walk"); hitUnitAnim = null; attackUnitAnim = UnitAnimType.GetUnitAnimType("dMinion_Attack"); idleUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Idle"); walkUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Walk"); hitUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Hit"); attackUnitAnim = UnitAnimType.GetUnitAnimType("dBareHands_Punch"); //animatedWalker = new AnimatedWalker(unitAnimation, UnitAnimType.GetUnitAnimType("dMinion_Idle"), UnitAnimType.GetUnitAnimType("dMinion_Walk"), 1f, 1f); animatedWalker = new AnimatedWalker(unitAnimation, idleUnitAnim, walkUnitAnim, 1f, 1f); bodyTransform.GetComponent <MeshRenderer>().material = GameAssets.i.m_ZombieSpriteSheet; //unitAnimation.PlayAnimForced(UnitAnimType.GetUnitAnimType("dBareHands_AttackPose"), 1f, null, null, null); //state = State.Busy; }
public void SetIdleWalkAnims(UnitAnimType idleUnitAnim, UnitAnimType walkUnitAnim) { animatedWalker = new AnimatedWalker(unitAnimation, idleUnitAnim, walkUnitAnim, 1f, 1f); }