コード例 #1
0
    protected static bool CheckDirectionFlagEnable(PosDirUtility.DirectionFlagType positionFlagType)
    {
        switch (positionFlagType)
        {
        case PosDirUtility.DirectionFlagType.Self:
        case PosDirUtility.DirectionFlagType.Player:
        case PosDirUtility.DirectionFlagType.Pet:
        case PosDirUtility.DirectionFlagType.Monster:
            return(SystemConfig.IsShowMonsterDir);

        default:
            return(false);
        }
    }
コード例 #2
0
    public static void AddDirectionFlag(PosDirUtility.DirectionFlagType directionFlagType, Transform root)
    {
        if (!PosDirUtility.CheckDirectionFlagEnable(directionFlagType))
        {
            return;
        }
        if (root.FindChild(PosDirUtility.GetDirectionFlagGameObjectName(directionFlagType)))
        {
            return;
        }
        GameObject gameObject = (GameObject)Object.Instantiate(AssetManager.AssetOfNoPool.LoadAssetNowNoAB(PosDirUtility.GetDirectionFlagAssetName(directionFlagType), typeof(Object)));

        gameObject.set_name(PosDirUtility.GetDirectionFlagGameObjectName(directionFlagType));
        gameObject.get_transform().set_parent(root);
        gameObject.get_transform().set_localPosition(new Vector3(0f, 0f, 3f));
        gameObject.get_transform().set_localRotation(Quaternion.Euler(-90f, 0f, 0f));
        gameObject.get_transform().set_localScale(new Vector3(0.1f, 6f, 0.1f));
    }
コード例 #3
0
 protected static string GetDirectionFlagGameObjectName(PosDirUtility.DirectionFlagType directionFlagType)
 {
     return("Flag_MonsterForward");
 }