コード例 #1
0
    void Start()
    {
        if (_fpSeedGoLR == null)
        {
            return;
        }

        try{
            _cntFootPrint = GetComponentInParent <Pathea.MainPlayerCmpt>() != null ? CntFootPrintPlayer : CntFootPrintNPC;
            _fpGoUpdates  = new FootprintDecal[2, _cntFootPrint];

            _mmc = GetComponentInParent <Pathea.MotionMgrCmpt>();
            int     sex = _mmc.GetComponent <Pathea.CommonCmpt>().sex == Pathea.PeSex.Male ? 0 : 1;
            Texture tex = Resources.Load(sex == 1 ? "Texture2D/footprint_f" : "Texture2D/footprint_m") as Texture;
            _fpSeedGoLR.GetComponent <Renderer>().sharedMaterial.mainTexture = tex;
            FootprintDecalMgr.Instance.Register(this);
        }
        catch {}
    }