// Start is called before the first frame update
    void Start()
    {
        walkingAudio       = true;
        aa                 = effects.GetComponent <AudioActions>();
        this.speed         = 5;
        this.health        = 100;
        this.experience    = 0;
        this.level         = 0;
        rb                 = GetComponent <Rigidbody2D>();
        sr                 = render.GetComponent <SpriteRenderer>();
        animator           = render.GetComponent <Animator>();
        nothooking         = true;
        this.canTakeDamage = true;
        this.canWalk       = true;
        this.canMove       = true;
        this.lookR         = true;
        this.enemyDrop     = 0;
        this.canShoot      = true;
        this.canDash       = true;
        this.isSide        = false;
        this.isDashing     = false;
        this.isGrounded    = false;
        this.isJumping     = false;

        lr          = GetComponent <LineRenderer>();
        lr.endWidth = lr.startWidth = 0.3f;

        distance = 10f;
        lasthook = 0;
        lm       = ~(1 << 12);
        hooking  = false;
        canHook  = true;

        this.lastTouched = this.initialPosition = transform.position;
    }
 public static string GetAudioFileExtension(AudioActions codec)
 {
     if (codec == AudioActions.Aac)
     {
         return("aac");
     }
     else if (codec == AudioActions.Flac)
     {
         return("flac");
     }
     else if (codec == AudioActions.Opus)
     {
         return("opus");
     }
     else
     {
         return("wav");
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Writing operation
        /// </summary>
        /// <param name="action">The audio action</param>
        /// <param name="value">The value to write</param>
        private static void Writer(AudioActions action, uint value)
        {
            if (action == AudioActions.Master)
            {
                value = ~value;

                // It's a 6bit value!
                value >>= 26;

                ushort encoded = (ushort)(value | (value << 8));
                PortIO.Out16((ushort)(m_nambar + MASTER_VOLUME), encoded);
            }
            else if (action == AudioActions.PCM_OUT)
            {
                value = ~value;

                // It's a 5 bit value!
                value >>= 27;

                ushort encoded = (ushort)(value | (value << 8));
                PortIO.Out16((ushort)(m_nambar + PCM_OUT_VOLUME), encoded);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Reading operation
 /// </summary>
 /// <param name="action">The audio action</param>
 /// <returns>The read value</returns>
 private static uint Reader(AudioActions action)
 {
     return(0);
 }
Esempio n. 5
0
 public AnimFrame(Mesh frameMesh, float frameDuration)
 {
     this.frameMesh     = frameMesh;
     this.frameDuration = frameDuration;
     this.audioAction   = AudioActions.None;
 }
 public static string GetAudioFile(int jobIndex, AudioActions codec)
 {
     return(string.Format("{0}Job{1}_Output.{2}", TempFilesPath, jobIndex, GetAudioFileExtension(codec)));
 }