Exemple #1
0
            public bool equals(Object o)
            {
                ClassKey key = (ClassKey)o;

                ClassDef aDef = _defRef.get();
                ClassDef bDef = key._defRef.get();

                if (aDef != bDef)
                {
                    return(false);
                }

                if (_parentRef == key._parentRef)
                {
                    return(true);
                }

                else if (_parentRef != null && key._parentRef != null)
                {
                    return(_parentRef.get() == key._parentRef.get());
                }

                else
                {
                    return(false);
                }
            }
Exemple #2
0
    public static void PressDown(ClassKey classKey, string key)
    {
        BehaviourAnimation.Play(classKey.gameObject, key);

        switch (key)
        {
        case "Right":
            MoveShield(classKey, new Vector2(60, 0));
            break;

        case "Left":
            MoveShield(classKey, new Vector2(-60, 0));
            break;

        case "Up":
            MoveShield(classKey, new Vector2(0, 60));
            break;

        case "Down":
            MoveShield(classKey, new Vector2(0, -60));
            break;

        case "Idle":
            MoveShield(classKey, new Vector2(1000, 1000));
            break;
        }
    }
Exemple #3
0
        public IHttpActionResult searchClassKey([FromBody] ClassKey classkey)
        {
            Console.WriteLine(classkey.ClassKeyID);

            string sSQL = "select pk_class_key_id as 'ClassKeyID', ck_class_type as 'ClassType', ck_class_code as 'ClassCode' ";

            sSQL += " from csp.xferclasskey where pk_class_key_id = " + classkey.ClassKeyID;

            var appBlock = new SqlDbConnectionBaseClass();
            var result   = appBlock.ExecuteForSelect(sSQL);
            var json     = JsonConvert.SerializeObject(result);
            var listData = JsonConvert.DeserializeObject <List <ClassKey> >(json);

            return(Ok(listData));
        }
Exemple #4
0
        private void Parsekeybag(NSData nsData)
        {
            ClassKey currentClassKey = null;

            foreach (var(tag, data) in LoopTLVBlocks(nsData))
            {
                var dataAsInt = 0;

                if (data.Length == 4)
                {
                    dataAsInt = GetInt(data);
                }

                if (tag == "TYPE")
                {
                    Type = dataAsInt;
                    if (Type > 3)
                    {
                        throw new Exception($"FAIL: keybag type > 3 : {Type}");
                    }
                }
                else if (tag == "UUID" && UUID == null)
                {
                    UUID = data;
                }
                else if (tag == "WRAP" && Wrap == null)
                {
                    Wrap = dataAsInt;
                }
                else if (tag == "UUID")
                {
                    if (currentClassKey != null)
                    {
                        ClassKeys.Add(currentClassKey.CLAS, currentClassKey);
                    }

                    currentClassKey = new ClassKey {
                        UUID = data
                    };
                }
                else if (_tags.Contains(tag) && currentClassKey != null)
                {
                    if (tag == nameof(ClassKey.CLAS))
                    {
                        currentClassKey.CLAS = dataAsInt;
                    }
                    else if (tag == nameof(ClassKey.KTYP))
                    {
                        currentClassKey.KTYP = dataAsInt;
                    }
                    else if (tag == nameof(ClassKey.WPKY))
                    {
                        currentClassKey.WPKY = data;
                    }
                    else if (tag == nameof(ClassKey.WRAP))
                    {
                        currentClassKey.WRAP = dataAsInt;
                    }
                }
                else
                {
                    Attr.Add(tag, data);
                }
            }

            if (currentClassKey != null)
            {
                ClassKeys.Add(currentClassKey.CLAS, currentClassKey);
            }
        }
Exemple #5
0
 public ControllerKeys()
 {
     this.classKey = GameObject.Find("Keys").GetComponent <ClassKey>();
 }
Exemple #6
0
 public static void MoveShield(ClassKey classKey, Vector2 pos)
 {
     classKey.shield.transform.position = pos;
 }