Queue recQ = new Queue(); //format: frame#horizontal#vertical#fire // Use this for initialization void Start() { anim = GetComponent <Animator>(); sr = GetComponent <SpriteRenderer>(); asm = GetComponent <AvatarStateManager>(); rb = GetComponent <Rigidbody2D>(); lastFrameCount = Time.frameCount; //initialFrame }
protected void Awake() { avatar = GetComponentInParent <AvatarPlayer>(); if (avatar == null) { Debug.LogFormat("{0} does not have an AvatarPlayer component!"); } avatar3DMovement = GetComponentInParent <Avatar3DMovement>(); if (avatar3DMovement == null) { Debug.LogFormat("{0} does not have an Avatar3DMovement component!"); } animations = transform.parent.GetComponentInChildren <Avatar3DAnimations>(); if (animations == null) { Debug.LogErrorFormat("{0} does not have a Avatar3DAnimations Component!"); } avatarStateManager = transform.parent.GetComponentInChildren <AvatarStateManager>(); if (avatarStateManager == null) { Debug.LogErrorFormat("{0} does not have a AvatarStateManager Component!"); } avatarStateIdle = GetComponent <AvatarStateIdle>(); if (avatarStateIdle == null) { Debug.LogWarningFormat("{0} does not have a AvatarStateIdle Component!", name); } avatarStateRun = GetComponent <AvatarStateRun>(); if (avatarStateRun == null) { Debug.LogWarningFormat("{0} does not have a AvatarStateRun Component!", name); } avatarStateJump = GetComponent <AvatarStateJump>(); if (avatarStateJump == null) { Debug.LogWarningFormat("{0} does not have a AvatarStateJump Component!", name); } }