예제 #1
0
        private int CheckSpecialVar(SymbolTable symbolTable)
        {
            int    ret           = 0;
            String imageFilename = symbolTable.getImageFilename();

            if (imageFilename != null && imageFilename.Length > 0)
            {
                filename = imageFilename;
                symbolTable.setImageFilename("");
            }
            if (symbolTable.get("isFriendBullet") == 1)
            {
                isFriendBullet = true;
            }
            if (symbolTable.get("isPlayer") == 1)
            {
                isPlayer = true;
                ret      = 1;
            }
            if (symbolTable.get("isEnemy") == 1)
            {
                isEnemy = true;
                ret     = 2;
            }
            if (symbolTable.ContainsKey("isScene"))
            {
                isScene = symbolTable.get("isScene") == 1;
            }
            if (symbolTable.ContainsKey("isVisible"))
            {
                isVisible = symbolTable.get("isVisible") == 1;
            }
            return(ret);
        }
예제 #2
0
 private void GetObjectInfo(SymbolTable symbolTable)
 {
     setX(symbolTable.get("x"));
     setY(symbolTable.get("y"));
     setVx(symbolTable.get("vx"));
     setVy(symbolTable.get("vy"));
     if (symbolTable.ContainsKey("hp"))
     {
         setHp((int)symbolTable.get("hp"));
     }
 }