scene

package
v0.0.0-...-bf68151 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(width, height int, requester Requester, game *data.Game, progress []byte, permanent []byte, purchases []string, fadingInCount int) *Manager

func (*Manager) BGMVolume

func (m *Manager) BGMVolume() int

func (*Manager) BottomOffset

func (m *Manager) BottomOffset() int

func (*Manager) Credits

func (m *Manager) Credits() *data.Credits

func (*Manager) Draw

func (m *Manager) Draw(screen *ebiten.Image) error

func (*Manager) DynamicShopData

func (m *Manager) DynamicShopData(products []int) []byte

func (*Manager) Game

func (m *Manager) Game() *data.Game

func (*Manager) GenerateRequestID

func (m *Manager) GenerateRequestID() int

func (*Manager) GoTo

func (m *Manager) GoTo(next Scene)

func (*Manager) GoToWithFading

func (m *Manager) GoToWithFading(next Scene, fadingOutCount, fadingInCount int)

func (*Manager) HasExtraBottomGrid

func (m *Manager) HasExtraBottomGrid() bool

func (*Manager) HasProgress

func (m *Manager) HasProgress() bool

func (*Manager) InitScene

func (m *Manager) InitScene(scene Scene)

func (*Manager) InterstitialAdsLoaded

func (m *Manager) InterstitialAdsLoaded() bool

func (*Manager) IsAdsRemoved

func (m *Manager) IsAdsRemoved() bool

func (*Manager) IsAvailable

func (m *Manager) IsAvailable(id int) bool

func (*Manager) IsPurchased

func (m *Manager) IsPurchased(key string) bool

func (*Manager) IsUnlocked

func (m *Manager) IsUnlocked(id int) bool

func (*Manager) PermanentMinigame

func (m *Manager) PermanentMinigame(id int) *MinigameData

func (*Manager) PermanentVariableValue

func (m *Manager) PermanentVariableValue(id int) int64

func (*Manager) Price

func (m *Manager) Price(key string) string

func (*Manager) Progress

func (m *Manager) Progress() []byte

func (*Manager) ReceiveResultIfExists

func (m *Manager) ReceiveResultIfExists(id int) *RequestResult

func (*Manager) RequestRewardedAds

func (m *Manager) RequestRewardedAds(requestID int, forceAds bool)

func (*Manager) RequestSavePermanentMinigame

func (m *Manager) RequestSavePermanentMinigame(requestID int, minigameID, score int, lastActiveAt int64)

func (*Manager) RequestSavePermanentVariable

func (m *Manager) RequestSavePermanentVariable(requestID int, permanentVariableID int, value int64)

func (*Manager) RequestSaveVibrationEnabled

func (m *Manager) RequestSaveVibrationEnabled(requestID int, vibrationEnabled bool)

func (*Manager) RequestSaveVolume

func (m *Manager) RequestSaveVolume(requestID int, seVolume int, bgmVolume int)

func (*Manager) Requester

func (m *Manager) Requester() Requester

func (*Manager) ResetPseudoScreen

func (m *Manager) ResetPseudoScreen()

func (*Manager) RespondAsset

func (m *Manager) RespondAsset(id int, success bool, data []byte)

func (*Manager) RespondChangeLanguage

func (m *Manager) RespondChangeLanguage(id int)

func (*Manager) RespondInterstitialAds

func (m *Manager) RespondInterstitialAds(id int, success bool)
func (m *Manager) RespondOpenLink(id int)

func (*Manager) RespondPurchase

func (m *Manager) RespondPurchase(id int, success bool, purchases []byte)

func (*Manager) RespondRestorePurchases

func (m *Manager) RespondRestorePurchases(id int, success bool, purchases []byte)

func (*Manager) RespondRewardedAds

func (m *Manager) RespondRewardedAds(id int, success bool)

func (*Manager) RespondSavePermanent

func (m *Manager) RespondSavePermanent(id int)

func (*Manager) RespondSaveProgress

func (m *Manager) RespondSaveProgress(id int)

func (*Manager) RespondShareImage

func (m *Manager) RespondShareImage(id int)

func (*Manager) RespondShowShop

func (m *Manager) RespondShowShop(id int, success bool, purchases []byte)

func (*Manager) RespondUnlockAchievement

func (m *Manager) RespondUnlockAchievement(id int)

func (*Manager) RewardedAdsLoaded

func (m *Manager) RewardedAdsLoaded() bool

func (*Manager) SEVolume

func (m *Manager) SEVolume() int

func (*Manager) SetLanguage

func (m *Manager) SetLanguage(language language.Tag) language.Tag

func (*Manager) SetPlatformData

func (m *Manager) SetPlatformData(key PlatformDataKey, value string)

func (*Manager) SetProgress

func (m *Manager) SetProgress(progress []byte)

func (*Manager) SetPseudoScreen

func (m *Manager) SetPseudoScreen(screen *ebiten.Image)

func (*Manager) SetScreenSize

func (m *Manager) SetScreenSize(width, height int)

func (*Manager) ShareScreenshot

func (m *Manager) ShareScreenshot()

func (*Manager) ShopData

func (m *Manager) ShopData(name data.ShopType, tabs []bool) []byte

func (*Manager) Size

func (m *Manager) Size() (int, int)

func (*Manager) SponsorTier

func (m *Manager) SponsorTier() int

func (*Manager) Update

func (m *Manager) Update() error

func (*Manager) VibrationEnabled

func (m *Manager) VibrationEnabled() bool

type MinigameData

type MinigameData struct {
	Score        int   `msgpack:"score"`
	LastActiveAt int64 `msgpack:"lastActiveAt"`
}

type Permanent

type Permanent struct {
	Minigames         []*MinigameData `msgpack:"minigame"`
	Variables         []int64         `msgpack:"variables"`
	BGMMute           int             `msgpack:"bgm_mute"`
	SEMute            int             `msgpack:"se_mute"`
	VibrationDisabled bool            `msgpack:"vibrationDisabled"`
}

type PlatformDataKey

type PlatformDataKey string
const (
	PlatformDataKeyInterstitialAdsLoaded PlatformDataKey = "interstitial_ads_loaded"
	PlatformDataKeyRewardedAdsLoaded     PlatformDataKey = "rewarded_ads_loaded"
	PlatformDataKeyBackButton            PlatformDataKey = "backbutton"
	PlatformDataKeyCredits               PlatformDataKey = "credits"
	PlatformDataKeyPrices                PlatformDataKey = "prices"
	PlatformDataKeyNews                  PlatformDataKey = "news"
	PlatformDataKeyPopupNewsID           PlatformDataKey = "popup_news_id"
)

type RequestResult

type RequestResult struct {
	ID        int
	Type      RequestType
	Succeeded bool
	Data      []byte
}

type RequestType

type RequestType int
const (
	RequestTypeUnlockAchievement RequestType = iota
	RequestTypeSaveProgress
	RequestTypeSavePermanent
	RequestTypePurchase
	RequestTypeShowShop
	RequestTypeRestorePurchases
	RequestTypeInterstitialAds
	RequestTypeRewardedAds
	RequestTypeOpenLink
	RequestTypeShareImage
	RequestTypeChangeLanguage
	RequestTypeAsset
)

type Requester

type Requester interface {
	RequestUnlockAchievement(requestID int, achievementID int)
	RequestSaveProgress(requestID int, data []byte)
	RequestSavePermanent(requestID int, data []byte)
	RequestPurchase(requestID int, productID string)
	RequestShowShop(requestID int, data string)
	RequestRestorePurchases(requestID int)
	RequestInterstitialAds(requestID int, forceAds bool)
	RequestRewardedAds(requestID int, forceAds bool)
	RequestOpenLink(requestID int, linkType string, data string)
	RequestShareImage(requestID int, title string, message string, image []byte)
	RequestTerminateGame()
	RequestChangeLanguage(requestID int, lang string)
	RequestReview()
	RequestSendAnalytics(eventName string, value string)
	RequestVibration(vibrationType string)
	RequestAsset(requestID int, key string)
	RequestMarkNewsRead(newsID int64)
}

type Scene

type Scene interface {
	Update(manager *Manager) error
	Draw(screen *ebiten.Image)
	Resize(width, height int)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL