コード例 #1
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.G))
        {
            Time.timeScale = 0.1f;
        }
        if (Input.GetKeyDown(KeyCode.V))
        {
            Time.timeScale = 1f;
        }
        if (Input.GetKeyDown(KeyCode.T))
        {
            Time.timeScale = 0.01f;
        }

        /*
         * //If hook is not throwing or pulling
         * if (input.hook && hook.throwCoroutine == null)
         * {
         *  //Value 10f in vector3 compensates for the Z position of the camera. Need to get this value from the camera (-Input.mousePosition.z)
         *  hook.throwCoroutine = hook.StartCoroutine(hook.Throw(Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 10f))));
         * }*/
        //Reset variables when character landed
        if (isOnGround)
        {
            curCoyoteTime   = Time.time + coyoteDuration;
            extraJumpsCount = extraJumps + (bonusAttributes.ContainsKey(BonusAttributes.JumpCount) ? (int)bonusAttributes[BonusAttributes.JumpCount] : 0);
        }

        //aimDirection = Input.mousePosition - Camera.main.WorldToScreenPoint(transform.position);

        //if (Mathf.Sign(aimDirection.x) != direction)
        //    FlipCharacterDirection();
    }
コード例 #2
0
 public bool Search(string name)
 {
     if (AttributesDictionary.ContainsKey(name))
     {
         Output = AttributesDictionary[name];
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #3
0
        public object GetAttributeValue(string attributeKey)
        {
            Log.DebugFormat("Attribute Key: {0}", attributeKey);

            if (!AttributesDictionary.ContainsKey(attributeKey))
            {
                Log.Debug("AttributesDictionary does not contain key: " + attributeKey);
                return(string.Empty);
            }

            Log.DebugFormat("AttributeValue: {0}", AttributesDictionary[attributeKey]);

            return(_reader[AttributesDictionary[attributeKey]]);
        }